@performant-software/core-data 1.2.0-beta.1 → 1.2.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/build/index.js +1 -1
  2. package/build/index.js.map +1 -1
  3. package/build/main.css +824 -5
  4. package/package.json +14 -4
  5. package/postcss.config.js +6 -0
  6. package/src/components/MediaGallery.js +1 -1
  7. package/src/components/PlaceDetailsPanel.js +14 -1
  8. package/src/components/PlaceMarker.js +2 -0
  9. package/src/components/PlaceResultsList.css +7 -0
  10. package/src/components/PlaceResultsList.js +178 -0
  11. package/src/components/{PlaceDetailsPanel.css → RelatedItemsList.css} +5 -5
  12. package/src/components/RelatedItemsList.js +14 -3
  13. package/src/components/RelatedList.js +16 -2
  14. package/src/components/RelatedMedia.js +15 -1
  15. package/src/components/RelatedOrganizations.js +9 -2
  16. package/src/components/RelatedPeople.js +9 -2
  17. package/src/components/RelatedPlaces.js +9 -2
  18. package/src/components/RelatedTaxonomies.js +9 -2
  19. package/src/i18n/en.json +27 -0
  20. package/src/i18n/i18n.js +26 -0
  21. package/src/index.css +3 -0
  22. package/src/index.js +4 -0
  23. package/src/types/AnnotationPage.js +15 -0
  24. package/src/types/Feature.js +10 -0
  25. package/src/types/FeatureGeometry.js +6 -0
  26. package/src/types/Place.js +1 -1
  27. package/src/types/RelatedItems.js +1 -1
  28. package/src/types/typesense/Place.js +14 -0
  29. package/tailwind.config.js +19 -0
  30. package/types/components/MediaGallery.js.flow +1 -1
  31. package/types/components/PlaceDetailsPanel.js.flow +14 -1
  32. package/types/components/PlaceMarker.js.flow +2 -0
  33. package/types/components/PlaceResultsList.js.flow +178 -0
  34. package/types/components/RelatedItemsList.js.flow +14 -3
  35. package/types/components/RelatedList.js.flow +16 -2
  36. package/types/components/RelatedMedia.js.flow +15 -1
  37. package/types/components/RelatedOrganizations.js.flow +9 -2
  38. package/types/components/RelatedPeople.js.flow +9 -2
  39. package/types/components/RelatedPlaces.js.flow +9 -2
  40. package/types/components/RelatedTaxonomies.js.flow +9 -2
  41. package/types/components/SearchResultsList.js.flow +160 -0
  42. package/types/i18n/i18n.js.flow +26 -0
  43. package/types/index.js.flow +4 -0
  44. package/types/types/AnnotationPage.js.flow +15 -0
  45. package/types/types/Feature.js.flow +10 -0
  46. package/types/types/FeatureGeometry.js.flow +6 -0
  47. package/types/types/Place.js.flow +1 -1
  48. package/types/types/RelatedItems.js.flow +1 -1
  49. package/types/types/typesense/Place.js.flow +14 -0
  50. package/webpack.config.js +31 -1
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{LoadAnimation:()=>a,MediaGallery:()=>u,PlaceDetailsPanel:()=>j,PlaceMarker:()=>M,RelatedItemsList:()=>N,RelatedList:()=>v,RelatedMedia:()=>y,RelatedOrganization:()=>g,RelatedPeople:()=>h,RelatedPlaces:()=>E,RelatedTaxonomies:()=>w});const r=require("react");var n=e.n(r);const a=function(e){var t="".concat(e.className||""," loader three-dots").trim();return n().createElement("span",{className:t})},l=require("@radix-ui/react-dialog"),o=require("@samvera/clover-iiif/viewer");var i=e.n(o);const c=require("lucide-react"),u=function(e){return n().createElement(l.Root,{onOpenChange:e.onClose,open:Boolean(e.defaultItem)},n().createElement(l.Portal,null,n().createElement(l.Overlay,{className:"dialog-overlay"}),n().createElement(l.Content,{className:"dialog-content"},n().createElement(l.Title,{className:"dialog-title flex items-center"},n().createElement(c.Image,{className:"h-4 w-4 mr-1.5"}),e.title),n().createElement("div",{className:"pt-6 pb-2 text-sm w-full text-muted min-h-20"},Boolean(e.defaultItem)&&n().createElement(i(),{iiifContent:e.defaultItem.manifest_url,options:{informationPanel:{open:!1}}})),n().createElement(l.Close,{asChild:!0},n().createElement("button",{className:"dialog-close rounded-full",type:"button"},n().createElement(c.X,{className:"h-7 w-7 p-1.5"}))))))},m=require("underscore");var s=e.n(m);const d=require("@radix-ui/react-accordion"),f=(require("@peripleo/peripleo"),require("@samvera/clover-iiif/primitives"));function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e){var t,a,l,o=(a=(0,r.useState)(),l=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,o,i=[],c=!0,u=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return i}}(a,l)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(a,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],c=o[1];return n().createElement("div",{className:"p-3 pb-4 grid grid-cols-3 gap-1"},s().map(null===(t=e.data)||void 0===t?void 0:t.items,(function(t){return n().createElement(f.Thumbnail,{key:t.body.id,className:"rounded shadow cursor-pointer",onClick:function(){return c(t.body)},thumbnail:[{id:t.body.content_thumbnail_url,type:"Image",width:e.thumbnailWidth,height:e.thumbnailHeight}]})})),n().createElement(u,{defaultItem:i,onClose:function(){return c(void 0)}}))};b.defaultProps={thumbnailHeight:80,thumbnailWidth:80};const y=b,v=function(e){var t=e.data.items;return s().isEmpty(t)?n().createElement("div",{className:"pt-6 pl-3 pr-6 pb-8 flex items-center justify-center text-muted/50 italic"},e.emptyMessage):n().createElement("ul",{className:"p-3 pt-1 pb-4"},s().map(t,(function(t){return n().createElement("li",{key:t.id,className:"flex items-center"},e.renderItem(t))})))},g=function(e){return n().createElement(v,{data:e.data,emptyMessage:"No related organization",renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.Building2,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})},h=function(e){return n().createElement(v,{data:e.data,emptyMessage:"No related people",renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.UserCircle,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})},E=function(e){return n().createElement(v,{data:e.data,emptyMessage:"No related places",renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.MapPin,{className:"h-4 w-4 mr-0.5 inline-block mb-0.5"}),e.body.title)}})},w=function(e){return n().createElement(v,{data:e.data,emptyMessage:"No related taxonomies",renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.ListTree,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})};var O=["data","error"];const N=function(e){return s().isEmpty(e.items)?null:n().createElement(d.Root,{type:"multiple"},s().map(e.items,(function(e){var t=e.data,r=e.error,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,O);return n().createElement(d.Item,{key:l.endpoint,value:l.endpoint},n().createElement(d.Header,null,n().createElement(d.Trigger,{className:"accordion-trigger border-black/20 border border-t border-b-0 border-l-0 border-r-0 border-solid rounded-none w-full flex justify-between items-center px-3 py-3 text-sm"},n().createElement("div",null,l.ui_label,t&&n().createElement("span",{className:"ml-1"},"(",t.items.length,")"),r&&n().createElement(c.AlertCircle,{className:"inline ml-1.5 h-4 w-4 text-red-600 align-text-bottom"}),!(t||r)&&n().createElement(a,{className:"text-muted/60 ml-4"})),n().createElement(c.ChevronDown,{className:"accordion-chevron h-4 w-4"}))),n().createElement(d.Content,{className:"accordion-content text-sm leading-6"},"media_contents"===l.endpoint&&n().createElement(y,{data:t}),"organizations"===l.endpoint&&n().createElement(g,{data:t}),"people"===l.endpoint&&n().createElement(h,{data:t}),"places"===l.endpoint&&n().createElement(E,{data:t}),"taxonomies"===l.endpoint&&n().createElement(w,{data:t})))})))},j=function(e){var t=(0,r.useRef)(null),a=(0,r.useMemo)((function(){var t=e.related.find((function(e){var t;return"media_contents"===e.endpoint&&!s().isEmpty(null===(t=e.data)||void 0===t?void 0:t.items)}));return t?t.data&&t.data.items[0].body:void 0}),[e.related]),l=(0,r.useMemo)((function(){var t;return null!==(t=e.place)&&void 0!==t&&t.user_defined?Object.values(e.place.user_defined):[]}),[e.place]);return n().createElement("aside",{className:"flex flex-col absolute z-10 h-full w-[280px] bg-white/80 backdrop-blur shadow overflow-y-auto",ref:t},n().createElement("button",{className:"absolute top-2 right-2 p-1.5 rounded-full z-10 bg-slate-200/60 hover:bg-slate-200 focus:outline-2 focus:outline-offset-2 focus:outline-teal-700",onClick:e.onClose,type:"button"},n().createElement(c.X,{className:"h-4 w-4"})),e.place&&n().createElement(n().Fragment,null,a&&n().createElement("div",{className:"relative w-full h-[200px] flex-grow-0 flex-shrink-0 bg-muted/20 z-0"},n().createElement("div",{className:"absolute top-0 left-0 w-full h-full flex justify-center items-center"},n().createElement(c.Image,{className:"h-20 w-20 text-gray-400",strokeWidth:1})),n().createElement("div",{className:"absolute top-0 left-0 w-full h-full flex justify-center items-center"},n().createElement("img",{className:"object-cover h-full w-full",src:a.content_url,alt:a.title}))),n().createElement("div",{className:"p-3"},n().createElement("h1",{className:"pr-6 font-medium"},e.place.properties.title),n().createElement("ol",{className:"text-sm mt-4 leading-6 overflow-hidden"},s().map(l,(function(e){var t=e.label,r=e.value;return n().createElement("li",{key:t,className:"mb-2"},n().createElement("div",{className:"text-muted"},t),n().createElement("div",{className:"font-medium overflow-hidden text-ellipsis"},r))})))),n().createElement(N,{items:e.related})))},x=require("@performant-software/geospatial");function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){var n,a,l,o;n=e,a=t,l=r[t],o=function(e,t){if("object"!=S(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a),(a="symbol"==S(o)?o:String(o))in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const M=function(e){var t,a,l=(t=(0,r.useState)(),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,o,i=[],c=!0,u=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return i}}(t,a)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=l[0],i=l[1],c=(0,r.useCallback)((function(e){var t={type:"FeatureCollection",features:[I(I({},e),{},{properties:I(I({},e.properties),{},{record_id:e.record_id})})]};i(t)}),[]);return(0,r.useEffect)((function(){fetch(e.url).then((function(e){return e.json()})).then(c)}),[e.url]),o?n().createElement(x.LocationMarker,{data:o}):null};module.exports=t})();
1
+ (()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{LoadAnimation:()=>a,MediaGallery:()=>u,PlaceDetailsPanel:()=>C,PlaceMarker:()=>z,PlaceResultsList:()=>B,RelatedItemsList:()=>I,RelatedList:()=>x,RelatedMedia:()=>w,RelatedOrganization:()=>N,RelatedPeople:()=>O,RelatedPlaces:()=>j,RelatedTaxonomies:()=>P});const r=require("react");var n=e.n(r);const a=function(e){var t="".concat(e.className||""," loader three-dots").trim();return n().createElement("span",{className:t})},l=require("@radix-ui/react-dialog"),o=require("@samvera/clover-iiif/viewer");var i=e.n(o);const c=require("lucide-react"),u=function(e){return n().createElement(l.Root,{className:"media-gallery",onOpenChange:e.onClose,open:Boolean(e.defaultItem)},n().createElement(l.Portal,null,n().createElement(l.Overlay,{className:"dialog-overlay"}),n().createElement(l.Content,{className:"dialog-content"},n().createElement(l.Title,{className:"dialog-title flex items-center"},n().createElement(c.Image,{className:"h-4 w-4 mr-1.5"}),e.title),n().createElement("div",{className:"pt-6 pb-2 text-sm w-full text-muted min-h-20"},Boolean(e.defaultItem)&&n().createElement(i(),{iiifContent:e.defaultItem.manifest_url,options:{informationPanel:{open:!1}}})),n().createElement(l.Close,{asChild:!0},n().createElement("button",{className:"dialog-close rounded-full",type:"button"},n().createElement(c.X,{className:"h-7 w-7 p-1.5"}))))))},s=require("underscore");var m=e.n(s);const d=require("@radix-ui/react-accordion"),f=require("i18next");var p=e.n(f),b={en:{translation:JSON.parse('{"RelatedItemsList":{"labels":{"count":"({{count}})"}},"RelatedOrganizations":{"labels":{"empty":"No related organizations"}},"RelatedPeople":{"labels":{"empty":"No related people"}},"RelatedPlaces":{"labels":{"empty":"No related places"}},"RelatedTaxonomies":{"labels":{"empty":"No related taxonomies"}}}')}},y=p().createInstance();y.init({debug:!0,fallbackLng:"en",lng:"en",interpolation:{escapeValue:!1},resources:b});const v=y,g=require("@samvera/clover-iiif/primitives");function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var E=function(e){var t,a,l,o=(a=(0,r.useState)(),l=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,o,i=[],c=!0,u=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return i}}(a,l)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(a,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],c=o[1];return n().createElement("div",{className:"p-3 pb-4 grid grid-cols-3 gap-1"},m().map(null===(t=e.data)||void 0===t?void 0:t.items,(function(t){return n().createElement(g.Thumbnail,{key:t.body.id,className:"rounded shadow cursor-pointer",onClick:function(){return c(t.body)},thumbnail:[{id:t.body.content_thumbnail_url,type:"Image",width:e.thumbnailWidth,height:e.thumbnailHeight}]})})),n().createElement(u,{defaultItem:i,onClose:function(){return c(void 0)}}))};E.defaultProps={thumbnailHeight:80,thumbnailWidth:80};const w=E,x=function(e){var t=e.data.items;return m().isEmpty(t)?n().createElement("div",{className:"pt-6 pl-3 pr-6 pb-8 flex items-center justify-center text-muted/50 italic"},e.emptyMessage):n().createElement("ul",{className:"p-3 pt-1 pb-4"},m().map(t,(function(t){return n().createElement("li",{key:t.id,className:"flex items-center"},e.renderItem(t))})))},N=function(e){return n().createElement(x,{data:e.data,emptyMessage:v.t("RelatedOrganizations.labels.empty"),renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.Building2,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})},O=function(e){return n().createElement(x,{data:e.data,emptyMessage:v.t("RelatedPeople.labels.empty"),renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.UserCircle,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})},j=function(e){return n().createElement(x,{data:e.data,emptyMessage:v.t("RelatedPlaces.labels.empty"),renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.MapPin,{className:"h-4 w-4 mr-0.5 inline-block mb-0.5"}),e.body.title)}})},P=function(e){return n().createElement(x,{data:e.data,emptyMessage:v.t("RelatedTaxonomies.labels.empty"),renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.ListTree,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})};var S=["data","error"];const I=function(e){return m().isEmpty(e.items)?null:n().createElement(d.Root,{className:"related-items-list",type:"multiple"},m().map(e.items,(function(e){var t,r=e.data,l=e.error,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,S);return n().createElement(d.Item,{key:o.endpoint,value:o.endpoint},n().createElement(d.Header,null,n().createElement(d.Trigger,{className:"accordion-trigger border-black/20 border border-t border-b-0 border-l-0 border-r-0 border-solid rounded-none w-full flex justify-between items-center px-3 py-3 text-sm"},n().createElement("div",null,o.ui_label,r&&n().createElement("span",{className:"ml-1"},v.t("RelatedItemsList.labels.count",{count:null===(t=r.items)||void 0===t?void 0:t.length})),l&&n().createElement(c.AlertCircle,{className:"inline ml-1.5 h-4 w-4 text-red-600 align-text-bottom"}),!(r||l)&&n().createElement(a,{className:"text-muted/60 ml-4"})),n().createElement(c.ChevronDown,{className:"accordion-chevron h-4 w-4"}))),n().createElement(d.Content,{className:"accordion-content text-sm leading-6"},"media_contents"===o.endpoint&&n().createElement(w,{data:r}),"organizations"===o.endpoint&&n().createElement(N,{data:r}),"people"===o.endpoint&&n().createElement(O,{data:r}),"places"===o.endpoint&&n().createElement(j,{data:r}),"taxonomies"===o.endpoint&&n().createElement(P,{data:r})))})))},C=function(e){var t=(0,r.useRef)(null),a=(0,r.useMemo)((function(){var t=e.related.find((function(e){var t;return"media_contents"===e.endpoint&&!m().isEmpty(null===(t=e.data)||void 0===t?void 0:t.items)}));return t?t.data&&t.data.items[0].body:void 0}),[e.related]),l=(0,r.useMemo)((function(){var t;return null!==(t=e.place)&&void 0!==t&&t.user_defined?Object.values(e.place.user_defined):[]}),[e.place]);return n().createElement("aside",{className:"flex flex-col absolute z-10 h-full w-[280px] bg-white/80 backdrop-blur shadow overflow-y-auto",ref:t},n().createElement("button",{className:"absolute top-2 right-2 p-1.5 rounded-full z-10 bg-slate-200/60 hover:bg-slate-200 focus:outline-2 focus:outline-offset-2 focus:outline-teal-700",onClick:e.onClose,type:"button"},n().createElement(c.X,{className:"h-4 w-4"})),e.place&&n().createElement(n().Fragment,null,a&&n().createElement("div",{className:"relative w-full h-[200px] flex-grow-0 flex-shrink-0 bg-muted/20 z-0"},n().createElement("div",{className:"absolute top-0 left-0 w-full h-full flex justify-center items-center"},n().createElement(c.Image,{className:"h-20 w-20 text-gray-400",strokeWidth:1})),n().createElement("div",{className:"absolute top-0 left-0 w-full h-full flex justify-center items-center"},n().createElement("img",{className:"object-cover h-full w-full",src:a.content_url,alt:a.title}))),n().createElement("div",{className:"p-3"},n().createElement("h1",{className:"pr-6 font-medium"},e.place.properties.title),n().createElement("ol",{className:"text-sm mt-4 leading-6 overflow-hidden"},m().map(l,(function(e){var t=e.label,r=e.value;return n().createElement("li",{key:t,className:"mb-2"},n().createElement("div",{className:"text-muted"},t),n().createElement("div",{className:"font-medium overflow-hidden text-ellipsis"},r))})))),n().createElement(I,{items:e.related})))},k=require("@peripleo/maplibre"),R=require("@performant-software/geospatial");function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){var n,a,l,o;n=e,a=t,l=r[t],o=function(e,t){if("object"!=_(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a),(a="symbol"==_(o)?o:String(o))in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const z=function(e){var t,a,l=(t=(0,r.useState)(),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,o,i=[],c=!0,u=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return i}}(t,a)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=l[0],i=l[1],c=(0,r.useCallback)((function(e){var t={type:"FeatureCollection",features:[A(A({},e),{},{properties:A(A({},e.properties),{},{record_id:e.record_id})})]};i(t)}),[]);return(0,r.useEffect)((function(){fetch(e.url).then((function(e){return e.json()})).then(c)}),[e.url]),o?n().createElement(R.LocationMarker,{data:o,useMap:k.useMap}):null},T=require("react-instantsearch"),L=require("react-virtualized-auto-sizer");var H=e.n(L);const F=require("react-window");var D=function(e){var t=e.hit,a=(0,r.useMemo)((function(){var t=["h-[5.5em]","border-b","flex","flex-col","justify-start"];return e.isHovered&&t.add("bg-teal-700/30"),t.join(" ")}),[e.isHovered]);return n().createElement("div",{className:a},n().createElement("button",{className:"py-2 px-3 flex-grow text-left inline-flex flex-col",onClick:e.onClick,type:"button"},n().createElement(T.Highlight,{attribute:"name",className:"line-clamp-2",hit:t}),n().createElement("p",{className:"text-muted text-xs line-clamp-1"},n().createElement(T.Highlight,{hit:t,attribute:"names"}))))};const B=function(e){var t=e.hits,r=e.hover,a=e.onClick,l=e.onHoverChange,o=function(e){var o=e.index,i=e.style,c=t[o],u=parseInt(c.record_id,10);return n().createElement("div",{style:i,onPointerEnter:function(){return l((null==r?void 0:r.id)===u?r:(e=c,{id:parseInt(e.record_id,10),type:"Feature",properties:{id:e.record_id,ccode:[],title:e.name,uuid:e.uuid,record_id:e.record_id,name:e.name,names:m().map(e.names,(function(e){return{toponym:e}})),type:e.type},geometry:{type:"Point",coordinates:e.coordinates.slice().reverse()}}));var e},onPointerLeave:function(){return l(void 0)}},n().createElement(D,{hit:c,isHovered:(null==r?void 0:r.id)===parseInt(null==c?void 0:c.record_id,10),onClick:function(){return a(c)}}))};return n().createElement(H(),null,(function(e){var r=e.height,a=e.width;return n().createElement(F.FixedSizeList,{height:r,itemCount:t.length,width:a,itemSize:88},o)}))};module.exports=t})();
2
2
  //#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AQ,mC,8vCC0D7C,QA3CoB,SAACC,GACnB,I,IAAoCuB,G,GAAVC,EAAAA,EAAAA,Y,EAAU,E,k5BAA7B2B,EAAK5B,EAAA,GAAEqE,EAAQrE,EAAA,GAOhBsE,GAASC,EAAAA,EAAAA,cAAY,SAAClE,GAC1B,IAAMmE,EAAoB,CACxB5E,KAAM,oBACN6E,SAAU,CAAAC,EAAAA,EAAA,GACLrE,GAAI,IACP6D,WAAUQ,EAAAA,EAAA,GACLrE,EAAK6D,YAAU,IAClBS,UAAWtE,EAAKsE,gBAKtBN,EAASG,EACX,GAAG,IAWH,OANAI,EAAAA,EAAAA,YAAU,WACRC,MAAMpG,EAAMqG,KACTC,MAAK,SAACC,GAAG,OAAKA,EAAIC,MAAM,IACxBF,KAAKT,EACV,GAAG,CAAC7F,EAAMqG,MAELlD,EAKH/C,IAAAA,cAACqG,EAAAA,eAAc,CACb7E,KAAMuB,IALD,IAQX,E","sources":["webpack://@performant-software/core-data/webpack/bootstrap","webpack://@performant-software/core-data/webpack/runtime/compat get default export","webpack://@performant-software/core-data/webpack/runtime/define property getters","webpack://@performant-software/core-data/webpack/runtime/hasOwnProperty shorthand","webpack://@performant-software/core-data/webpack/runtime/make namespace object","webpack://@performant-software/core-data/external commonjs2 \"react\"","webpack://@performant-software/core-data/./src/components/LoadAnimation.js","webpack://@performant-software/core-data/external commonjs \"@radix-ui/react-dialog\"","webpack://@performant-software/core-data/external commonjs \"@samvera/clover-iiif/viewer\"","webpack://@performant-software/core-data/external commonjs \"lucide-react\"","webpack://@performant-software/core-data/./src/components/MediaGallery.js","webpack://@performant-software/core-data/external commonjs \"underscore\"","webpack://@performant-software/core-data/external commonjs \"@radix-ui/react-accordion\"","webpack://@performant-software/core-data/external commonjs \"@samvera/clover-iiif/primitives\"","webpack://@performant-software/core-data/external commonjs \"@peripleo/peripleo\"","webpack://@performant-software/core-data/./src/components/RelatedMedia.js","webpack://@performant-software/core-data/./src/components/RelatedList.js","webpack://@performant-software/core-data/./src/components/RelatedOrganizations.js","webpack://@performant-software/core-data/./src/components/RelatedPeople.js","webpack://@performant-software/core-data/./src/components/RelatedPlaces.js","webpack://@performant-software/core-data/./src/components/RelatedTaxonomies.js","webpack://@performant-software/core-data/./src/components/RelatedItemsList.js","webpack://@performant-software/core-data/./src/components/PlaceDetailsPanel.js","webpack://@performant-software/core-data/external commonjs \"@performant-software/geospatial\"","webpack://@performant-software/core-data/./src/components/PlaceMarker.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","// @flow\n\nimport React from 'react';\nimport './LoadAnimation.css';\n\ntype Props = {\n /**\n * Additional class name to apply to the element.\n */\n className?: string\n};\n\n/**\n * This component renders a basic loading animation.\n */\nconst LoadAnimation = (props: Props) => {\n const className = `${props.className || ''} loader three-dots`.trim();\n\n return (\n <span className={className} />\n );\n};\n\nexport default LoadAnimation;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@radix-ui/react-dialog\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@samvera/clover-iiif/viewer\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"lucide-react\");","// @flow\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport Viewer from '@samvera/clover-iiif/viewer';\nimport { Image, X } from 'lucide-react';\nimport React from 'react';\nimport type { MediaContent } from '../types/MediaContent';\n\nimport './MediaGallery.css';\n\ntype Props = {\n /**\n * The MediaContent record contain the IIIF manifest URL.\n */\n defaultItem: MediaContent,\n\n /**\n * Callback fired when the dialog is closed.\n */\n onClose: () => void,\n\n /**\n * Title text to display at the top of the dialog.\n */\n title?: string\n};\n\n/**\n * This component renders a IIIF Viewer for the passed MediaContent record.\n */\nconst MediaGallery = (props: Props) => (\n <Dialog.Root\n onOpenChange={props.onClose}\n open={Boolean(props.defaultItem)}\n >\n <Dialog.Portal>\n <Dialog.Overlay\n className='dialog-overlay'\n />\n <Dialog.Content\n className='dialog-content'\n >\n <Dialog.Title\n className='dialog-title flex items-center'\n >\n <Image\n className='h-4 w-4 mr-1.5'\n />\n { props.title }\n </Dialog.Title>\n <div\n className='pt-6 pb-2 text-sm w-full text-muted min-h-20'\n >\n { Boolean(props.defaultItem) && (\n <Viewer\n iiifContent={props.defaultItem.manifest_url}\n options={{\n informationPanel: {\n open: false\n }\n }}\n />\n )}\n </div>\n <Dialog.Close\n asChild\n >\n <button\n className='dialog-close rounded-full'\n type='button'\n >\n <X className='h-7 w-7 p-1.5' />\n </button>\n </Dialog.Close>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n);\n\nexport default MediaGallery;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"underscore\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@radix-ui/react-accordion\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@samvera/clover-iiif/primitives\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@peripleo/peripleo\");","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { Thumbnail } from '@samvera/clover-iiif/primitives';\nimport React, { useState } from 'react';\nimport _ from 'underscore';\nimport type { MediaContent } from '../types/MediaContent';\nimport MediaGallery from './MediaGallery';\n\ntype Props = {\n data: AnnotationPage<MediaContent>,\n thumbnailHeight?: number,\n thumbnailWidth?: number\n};\n\nconst DEFAULT_THUMBNAIL_HEIGHT = 80;\nconst DEFAULT_THUMBNAIL_WIDTH = 80;\n\nconst RelatedMedia = (props: Props) => {\n const [showGallery, setShowGallery] = useState<MediaContent>();\n\n return (\n <div\n className='p-3 pb-4 grid grid-cols-3 gap-1'\n >\n { _.map(props.data?.items, (item) => (\n <Thumbnail\n key={item.body.id}\n className='rounded shadow cursor-pointer'\n onClick={() => setShowGallery(item.body)}\n thumbnail={[{\n id: item.body.content_thumbnail_url,\n type: 'Image',\n width: props.thumbnailWidth,\n height: props.thumbnailHeight\n }]}\n />\n ))}\n <MediaGallery\n defaultItem={showGallery}\n onClose={() => setShowGallery(undefined)}\n />\n </div>\n );\n};\n\nRelatedMedia.defaultProps = {\n thumbnailHeight: DEFAULT_THUMBNAIL_HEIGHT,\n thumbnailWidth: DEFAULT_THUMBNAIL_WIDTH\n};\n\nexport default RelatedMedia;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport React from 'react';\nimport _ from 'underscore';\n\ntype Item = {\n id: string\n};\n\ntype Props = {\n data: AnnotationPage<Item>,\n emptyMessage?: string,\n renderItem: (item: Item) => JSX.Element\n};\n\nconst RelatedList = (props: Props) => {\n const { items } = props.data;\n\n if (_.isEmpty(items)) {\n return (\n <div\n className='pt-6 pl-3 pr-6 pb-8 flex items-center justify-center text-muted/50 italic'\n >\n { props.emptyMessage }\n </div>\n );\n }\n\n return (\n <ul\n className='p-3 pt-1 pb-4'\n >\n { _.map(items, (item) => (\n <li\n key={item.id}\n className='flex items-center'\n >\n { props.renderItem(item) }\n </li>\n ))}\n </ul>\n );\n};\n\nexport default RelatedList;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { Building2 } from 'lucide-react';\nimport React from 'react';\nimport type { Organization } from '../types/Organization';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n data: AnnotationPage<Organization>\n};\n\nconst RelatedOrganizations = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={'No related organization'}\n renderItem={(organization) => (\n <>\n <Building2\n className='h-4 w-4 mr-1.5'\n />\n { organization.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedOrganizations;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { UserCircle } from 'lucide-react';\nimport React from 'react';\nimport type { Person } from '../types/Person';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n data: AnnotationPage<Person>\n};\n\nconst RelatedPeople = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={'No related people'}\n renderItem={(person) => (\n <>\n <UserCircle\n className='h-4 w-4 mr-1.5'\n />\n { person.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedPeople;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { MapPin } from 'lucide-react';\nimport React from 'react';\nimport type { Place } from '../types/Place';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n data: AnnotationPage<Place>\n};\n\nconst RelatedPlaces = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={'No related places'}\n renderItem={(place) => (\n <>\n <MapPin\n className='h-4 w-4 mr-0.5 inline-block mb-0.5'\n />\n { place.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedPlaces;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { ListTree } from 'lucide-react';\nimport React from 'react';\nimport RelatedList from './RelatedList';\nimport type { Taxonomy } from '../types/Taxonomy';\n\ntype Props = {\n data: AnnotationPage<Taxonomy>\n};\n\nconst RelatedTaxonomies = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={'No related taxonomies'}\n renderItem={(taxonomy) => (\n <>\n <ListTree\n className='h-4 w-4 mr-1.5'\n />\n { taxonomy.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedTaxonomies;\n","// @flow\n\nimport * as Accordion from '@radix-ui/react-accordion';\nimport { AlertCircle, ChevronDown } from 'lucide-react';\nimport React from 'react';\nimport _ from 'underscore';\nimport LoadAnimation from './LoadAnimation';\nimport RelatedMedia from './RelatedMedia';\nimport RelatedOrganizations from './RelatedOrganizations';\nimport RelatedPeople from './RelatedPeople';\nimport RelatedPlaces from './RelatedPlaces';\nimport RelatedTaxonomies from './RelatedTaxonomies';\nimport type { RelatedItems } from '../types/RelatedItems';\n\ntype Props = {\n items: Array<RelatedItems>\n};\n\nconst RelatedItemsList = (props: Props) => {\n if (_.isEmpty(props.items)) {\n return null;\n }\n\n return (\n <Accordion.Root type='multiple'>\n { _.map(props.items, ({ data, error, ...conf }) => (\n <Accordion.Item\n key={conf.endpoint}\n value={conf.endpoint}\n >\n <Accordion.Header>\n <Accordion.Trigger\n className='accordion-trigger border-black/20 border border-t border-b-0 border-l-0 border-r-0 border-solid\n rounded-none w-full flex justify-between items-center px-3 py-3 text-sm'\n >\n <div>\n { conf.ui_label }\n { data && (\n <span className='ml-1'>\n ({ data.items.length })\n </span>\n )}\n { error && (\n <AlertCircle\n className='inline ml-1.5 h-4 w-4 text-red-600 align-text-bottom'\n />\n )}\n { !(data || error) && (\n <LoadAnimation\n className='text-muted/60 ml-4'\n />\n )}\n </div>\n <ChevronDown\n className='accordion-chevron h-4 w-4'\n />\n </Accordion.Trigger>\n </Accordion.Header>\n <Accordion.Content\n className='accordion-content text-sm leading-6'\n >\n { conf.endpoint === 'media_contents' && (\n <RelatedMedia\n data={data}\n />\n )}\n { conf.endpoint === 'organizations' && (\n <RelatedOrganizations\n data={data}\n />\n )}\n { conf.endpoint === 'people' && (\n <RelatedPeople\n data={data}\n />\n )}\n { conf.endpoint === 'places' && (\n <RelatedPlaces\n data={data}\n />\n )}\n { conf.endpoint === 'taxonomies' && (\n <RelatedTaxonomies\n data={data}\n />\n )}\n </Accordion.Content>\n </Accordion.Item>\n ))}\n </Accordion.Root>\n );\n};\n\nexport default RelatedItemsList;\n","// @flow\n\nimport { Image, X } from 'lucide-react';\nimport React, { useMemo, useRef } from 'react';\nimport _ from 'underscore';\nimport type { Place } from '../types/Place';\nimport type { RelatedItems } from '../types/RelatedItems';\nimport RelatedItemsList from './RelatedItemsList';\nimport './PlaceDetailsPanel.css';\n\ntype Props = {\n place?: Place,\n related: Array<RelatedItems>,\n onClose: () => void\n};\n\nconst PlaceDetailsPanel = (props: Props) => {\n const el = useRef<HTMLElement>(null);\n\n /**\n * Returns the first image for the passed related items.\n */\n const firstImage = useMemo(() => {\n const images = props.related.find((i) => i.endpoint === 'media_contents' && !_.isEmpty(i.data?.items));\n return images ? (images.data && images.data.items[0].body) : undefined;\n }, [props.related]);\n\n /**\n * Sets the user defined field values.\n *\n * @type {UserDefinedField[]|*[]}\n */\n const userDefined = useMemo(() => (\n props.place?.user_defined ? Object.values(props.place.user_defined) : []\n ), [props.place]);\n\n return (\n <aside\n className='flex flex-col absolute z-10 h-full w-[280px] bg-white/80 backdrop-blur shadow overflow-y-auto'\n ref={el}\n >\n <button\n className='absolute top-2 right-2 p-1.5 rounded-full z-10 bg-slate-200/60 hover:bg-slate-200 focus:outline-2 focus:outline-offset-2 focus:outline-teal-700'\n onClick={props.onClose}\n type='button'\n >\n <X className='h-4 w-4' />\n </button>\n { props.place && (\n <>\n { firstImage && (\n <div\n className='relative w-full h-[200px] flex-grow-0 flex-shrink-0 bg-muted/20 z-0'\n >\n <div\n className='absolute top-0 left-0 w-full h-full flex justify-center items-center'\n >\n <Image\n className='h-20 w-20 text-gray-400'\n strokeWidth={1}\n />\n </div>\n <div\n className='absolute top-0 left-0 w-full h-full flex justify-center items-center'\n >\n <img\n className='object-cover h-full w-full'\n src={firstImage.content_url}\n alt={firstImage.title}\n />\n </div>\n </div>\n )}\n <div\n className='p-3'\n >\n <h1\n className='pr-6 font-medium'\n >\n { props.place.properties.title }\n </h1>\n <ol\n className='text-sm mt-4 leading-6 overflow-hidden'\n >\n { _.map(userDefined, ({ label, value }) => (\n <li\n key={label}\n className='mb-2'\n >\n <div\n className='text-muted'\n >\n { label }\n </div>\n <div\n className='font-medium overflow-hidden text-ellipsis'\n >\n { value }\n </div>\n </li>\n ))}\n </ol>\n </div>\n <RelatedItemsList\n items={props.related}\n />\n </>\n )}\n </aside>\n );\n};\n\nexport default PlaceDetailsPanel;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@performant-software/geospatial\");","// @flow\n\nimport { LocationMarker } from '@performant-software/geospatial';\nimport React, { useCallback, useEffect, useState } from 'react';\n\ntype Props = {\n /**\n * The URL of the Core Data place record.\n */\n url: string\n};\n\n/**\n * This component renders a map marker for a given Core Data Place record.\n */\nconst PlaceMarker = (props: Props) => {\n const [place, setPlace] = useState();\n\n /**\n * Converts the passed data to a feature collection and sets it on the state.\n *\n * @type {(function(*): void)|*}\n */\n const onLoad = useCallback((data) => {\n const featureCollection = {\n type: 'FeatureCollection',\n features: [{\n ...data,\n properties: {\n ...data.properties,\n record_id: data.record_id\n }\n }]\n };\n\n setPlace(featureCollection);\n }, []);\n\n /**\n * Fetch the place record from the passed URL.\n */\n useEffect(() => {\n fetch(props.url)\n .then((res) => res.json())\n .then(onLoad);\n }, [props.url]);\n\n if (!place) {\n return null;\n }\n\n return (\n <LocationMarker\n data={place}\n />\n );\n};\n\nexport default PlaceMarker;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","props","className","concat","trim","React","Dialog","onOpenChange","onClose","open","Boolean","defaultItem","Image","title","Viewer","iiifContent","manifest_url","options","informationPanel","asChild","type","X","RelatedMedia","_props$data","_useState2","useState","showGallery","setShowGallery","_","data","items","item","Thumbnail","body","id","onClick","thumbnail","content_thumbnail_url","width","thumbnailWidth","height","thumbnailHeight","MediaGallery","undefined","defaultProps","emptyMessage","renderItem","RelatedList","organization","Building2","person","UserCircle","place","MapPin","taxonomy","ListTree","Accordion","_ref","error","conf","_objectWithoutProperties","_excluded","endpoint","ui_label","length","AlertCircle","LoadAnimation","ChevronDown","RelatedOrganizations","RelatedPeople","RelatedPlaces","RelatedTaxonomies","el","useRef","firstImage","useMemo","images","related","find","i","_i$data","userDefined","_props$place","user_defined","values","ref","strokeWidth","src","content_url","alt","properties","label","RelatedItemsList","setPlace","onLoad","useCallback","featureCollection","features","_objectSpread","record_id","useEffect","fetch","url","then","res","json","LocationMarker"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,mRCL9D,MAAM,EAA+BC,QAAQ,S,aCuB7C,QARsB,SAACC,GACrB,IAAMC,EAAY,GAAAC,OAAGF,EAAMC,WAAa,GAAE,sBAAqBE,OAE/D,OACEC,IAAAA,cAAA,QAAMH,UAAWA,GAErB,ECrBM,EAA+BF,QAAQ,0BCAvC,EAA+BA,QAAQ,+B,aCA7C,MAAM,EAA+BA,QAAQ,gBC+E7C,EAlDqB,SAACC,GAAY,OAChCI,IAAAA,cAACC,EAAAA,KAAW,CACVJ,UAA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A,IAAMmG,EAAOI,OAAO,SAACC,GAAO,MAAM,CAAEA,QAAAA,EAAS,IACpD3H,KAAMsH,EAAOtH,MAEf4H,SAAU,CACR5H,KAAM,QACN6H,YAAaP,EAAOO,YAAYC,QAAQC,cAf1B,IAACT,CAoHmE,EAC9EU,eAAgB,kBAAMhB,OAAc9E,EAAU,GAE9CjD,IAAAA,cAACqH,EAAY,CACXC,IAAKA,EACLE,WAAWM,aAAK,EAALA,EAAOtF,MAAO2F,SAASb,aAAG,EAAHA,EAAKV,UAAW,IAClDnE,QAAS,kBAAMA,EAAQ6E,EAAI,IAInC,EAEA,OACEtH,IAAAA,cAACgJ,IAAS,MACP,SAAAC,GAAA,IAAGnG,EAAMmG,EAANnG,OAAQF,EAAKqG,EAALrG,MAAK,OACf5C,IAAAA,cAACkJ,EAAAA,cAAa,CACZpG,OAAQA,EACRqG,UAAWtB,EAAKpD,OAChB7B,MAAOA,EACPwG,SAAU,IAERpB,EACY,GAIxB,E","sources":["webpack://@performant-software/core-data/webpack/bootstrap","webpack://@performant-software/core-data/webpack/runtime/compat get default export","webpack://@performant-software/core-data/webpack/runtime/define property getters","webpack://@performant-software/core-data/webpack/runtime/hasOwnProperty shorthand","webpack://@performant-software/core-data/webpack/runtime/make namespace object","webpack://@performant-software/core-data/external commonjs2 \"react\"","webpack://@performant-software/core-data/./src/components/LoadAnimation.js","webpack://@performant-software/core-data/external commonjs \"@radix-ui/react-dialog\"","webpack://@performant-software/core-data/external commonjs \"@samvera/clover-iiif/viewer\"","webpack://@performant-software/core-data/external commonjs \"lucide-react\"","webpack://@performant-software/core-data/./src/components/MediaGallery.js","webpack://@performant-software/core-data/external commonjs \"underscore\"","webpack://@performant-software/core-data/external commonjs \"@radix-ui/react-accordion\"","webpack://@performant-software/core-data/external commonjs \"i18next\"","webpack://@performant-software/core-data/./src/i18n/i18n.js","webpack://@performant-software/core-data/external commonjs \"@samvera/clover-iiif/primitives\"","webpack://@performant-software/core-data/./src/components/RelatedMedia.js","webpack://@performant-software/core-data/./src/components/RelatedList.js","webpack://@performant-software/core-data/./src/components/RelatedOrganizations.js","webpack://@performant-software/core-data/./src/components/RelatedPeople.js","webpack://@performant-software/core-data/./src/components/RelatedPlaces.js","webpack://@performant-software/core-data/./src/components/RelatedTaxonomies.js","webpack://@performant-software/core-data/./src/components/RelatedItemsList.js","webpack://@performant-software/core-data/./src/components/PlaceDetailsPanel.js","webpack://@performant-software/core-data/external commonjs \"@peripleo/maplibre\"","webpack://@performant-software/core-data/external commonjs \"@performant-software/geospatial\"","webpack://@performant-software/core-data/./src/components/PlaceMarker.js","webpack://@performant-software/core-data/external commonjs \"react-instantsearch\"","webpack://@performant-software/core-data/external commonjs \"react-virtualized-auto-sizer\"","webpack://@performant-software/core-data/external commonjs \"react-window\"","webpack://@performant-software/core-data/./src/components/PlaceResultsList.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","// @flow\n\nimport React from 'react';\nimport './LoadAnimation.css';\n\ntype Props = {\n /**\n * Additional class name to apply to the element.\n */\n className?: string\n};\n\n/**\n * This component renders a basic loading animation.\n */\nconst LoadAnimation = (props: Props) => {\n const className = `${props.className || ''} loader three-dots`.trim();\n\n return (\n <span className={className} />\n );\n};\n\nexport default LoadAnimation;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@radix-ui/react-dialog\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@samvera/clover-iiif/viewer\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"lucide-react\");","// @flow\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport Viewer from '@samvera/clover-iiif/viewer';\nimport { Image, X } from 'lucide-react';\nimport React from 'react';\nimport type { MediaContent } from '../types/MediaContent';\nimport './MediaGallery.css';\n\ntype Props = {\n /**\n * The MediaContent record contain the IIIF manifest URL.\n */\n defaultItem: MediaContent,\n\n /**\n * Callback fired when the dialog is closed.\n */\n onClose: () => void,\n\n /**\n * Title text to display at the top of the dialog.\n */\n title?: string\n};\n\n/**\n * This component renders a IIIF Viewer for the passed MediaContent record.\n */\nconst MediaGallery = (props: Props) => (\n <Dialog.Root\n className='media-gallery'\n onOpenChange={props.onClose}\n open={Boolean(props.defaultItem)}\n >\n <Dialog.Portal>\n <Dialog.Overlay\n className='dialog-overlay'\n />\n <Dialog.Content\n className='dialog-content'\n >\n <Dialog.Title\n className='dialog-title flex items-center'\n >\n <Image\n className='h-4 w-4 mr-1.5'\n />\n { props.title }\n </Dialog.Title>\n <div\n className='pt-6 pb-2 text-sm w-full text-muted min-h-20'\n >\n { Boolean(props.defaultItem) && (\n <Viewer\n iiifContent={props.defaultItem.manifest_url}\n options={{\n informationPanel: {\n open: false\n }\n }}\n />\n )}\n </div>\n <Dialog.Close\n asChild\n >\n <button\n className='dialog-close rounded-full'\n type='button'\n >\n <X className='h-7 w-7 p-1.5' />\n </button>\n </Dialog.Close>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n);\n\nexport default MediaGallery;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"underscore\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@radix-ui/react-accordion\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"i18next\");","// @flow\n\nimport i18next from 'i18next';\n\nimport en from './en.json';\n\nconst resources = {\n en: {\n translation: en\n }\n};\n\nconst i18n = i18next.createInstance();\n\ni18n\n .init({\n debug: true,\n fallbackLng: 'en',\n lng: 'en',\n interpolation: {\n escapeValue: false,\n },\n resources\n });\n\nexport default i18n;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@samvera/clover-iiif/primitives\");","// @flow\n\nimport { Thumbnail } from '@samvera/clover-iiif/primitives';\nimport React, { useState } from 'react';\nimport _ from 'underscore';\nimport type { AnnotationPage } from '../types/AnnotationPage';\nimport type { MediaContent } from '../types/MediaContent';\nimport MediaGallery from './MediaGallery';\n\ntype Props = {\n /**\n * The annotation page containing the media content to render.\n */\n data: AnnotationPage<MediaContent>,\n\n /**\n * Media thumbnail height.\n */\n thumbnailHeight?: number,\n\n /**\n * Media thumbnail width.\n */\n thumbnailWidth?: number\n};\n\nconst DEFAULT_THUMBNAIL_HEIGHT = 80;\nconst DEFAULT_THUMBNAIL_WIDTH = 80;\n\n/**\n * This component renders the related Core Data media records as well as a gallery viewer.\n */\nconst RelatedMedia = (props: Props) => {\n const [showGallery, setShowGallery] = useState<MediaContent>();\n\n return (\n <div\n className='p-3 pb-4 grid grid-cols-3 gap-1'\n >\n { _.map(props.data?.items, (item) => (\n <Thumbnail\n key={item.body.id}\n className='rounded shadow cursor-pointer'\n onClick={() => setShowGallery(item.body)}\n thumbnail={[{\n id: item.body.content_thumbnail_url,\n type: 'Image',\n width: props.thumbnailWidth,\n height: props.thumbnailHeight\n }]}\n />\n ))}\n <MediaGallery\n defaultItem={showGallery}\n onClose={() => setShowGallery(undefined)}\n />\n </div>\n );\n};\n\nRelatedMedia.defaultProps = {\n thumbnailHeight: DEFAULT_THUMBNAIL_HEIGHT,\n thumbnailWidth: DEFAULT_THUMBNAIL_WIDTH\n};\n\nexport default RelatedMedia;\n","// @flow\n\nimport React from 'react';\nimport _ from 'underscore';\nimport type { AnnotationPage } from '../types/AnnotationPage';\n\ntype Item = {\n id: string\n};\n\ntype Props = {\n /**\n * An annotation page containing the list of records to render.\n */\n data: AnnotationPage<Item>,\n\n /**\n * A message to display when the list is empty.\n */\n emptyMessage: string,\n\n /**\n * Render function used to determine how to present the passed item.\n */\n renderItem: (item: Item) => JSX.Element\n};\n\n/**\n * This component is a helper component used to structure the lists for the other `Related*` comnponents.\n */\nconst RelatedList = (props: Props) => {\n const { items } = props.data;\n\n if (_.isEmpty(items)) {\n return (\n <div\n className='pt-6 pl-3 pr-6 pb-8 flex items-center justify-center text-muted/50 italic'\n >\n { props.emptyMessage }\n </div>\n );\n }\n\n return (\n <ul\n className='p-3 pt-1 pb-4'\n >\n { _.map(items, (item) => (\n <li\n key={item.id}\n className='flex items-center'\n >\n { props.renderItem(item) }\n </li>\n ))}\n </ul>\n );\n};\n\nexport default RelatedList;\n","// @flow\n\nimport { Building2 } from 'lucide-react';\nimport React from 'react';\nimport i18n from '../i18n/i18n';\nimport type { AnnotationPage } from '../types/AnnotationPage';\nimport type { Organization } from '../types/Organization';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n /**\n * The annotation page containing the Core Data organizations to render.\n */\n data: AnnotationPage<Organization>\n};\n\n/**\n * This component renders the related Core Data organizations records.\n */\nconst RelatedOrganizations = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={i18n.t('RelatedOrganizations.labels.empty')}\n renderItem={(organization) => (\n <>\n <Building2\n className='h-4 w-4 mr-1.5'\n />\n { organization.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedOrganizations;\n","// @flow\n\nimport { UserCircle } from 'lucide-react';\nimport React from 'react';\nimport i18n from '../i18n/i18n';\nimport type { AnnotationPage } from '../types/AnnotationPage';\nimport type { Person } from '../types/Person';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n /**\n * The annotation page containing the Core Data people to render.\n */\n data: AnnotationPage<Person>\n};\n\n/**\n * This component renders the related Core Data organizations.\n */\nconst RelatedPeople = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={i18n.t('RelatedPeople.labels.empty')}\n renderItem={(person) => (\n <>\n <UserCircle\n className='h-4 w-4 mr-1.5'\n />\n { person.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedPeople;\n","// @flow\n\nimport { MapPin } from 'lucide-react';\nimport React from 'react';\nimport i18n from '../i18n/i18n';\nimport type { AnnotationPage } from '../types/AnnotationPage';\nimport type { Place } from '../types/Place';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n /**\n * The annotation page containing the Core Data places to render.\n */\n data: AnnotationPage<Place>\n};\n\n/**\n * This component renders the related Core Data places.\n */\nconst RelatedPlaces = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={i18n.t('RelatedPlaces.labels.empty')}\n renderItem={(place) => (\n <>\n <MapPin\n className='h-4 w-4 mr-0.5 inline-block mb-0.5'\n />\n { place.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedPlaces;\n","// @flow\n\nimport { ListTree } from 'lucide-react';\nimport React from 'react';\nimport i18n from '../i18n/i18n';\nimport type { AnnotationPage } from '../types/AnnotationPage';\nimport RelatedList from './RelatedList';\nimport type { Taxonomy } from '../types/Taxonomy';\n\ntype Props = {\n /**\n * The annotation page containing the Core Data taxonomies to render.\n */\n data: AnnotationPage<Taxonomy>\n};\n\n/**\n * This component renders the related Core Data taxonomies.\n */\nconst RelatedTaxonomies = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={i18n.t('RelatedTaxonomies.labels.empty')}\n renderItem={(taxonomy) => (\n <>\n <ListTree\n className='h-4 w-4 mr-1.5'\n />\n { taxonomy.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedTaxonomies;\n","// @flow\n\nimport * as Accordion from '@radix-ui/react-accordion';\nimport { AlertCircle, ChevronDown } from 'lucide-react';\nimport React from 'react';\nimport _ from 'underscore';\nimport i18n from '../i18n/i18n';\nimport LoadAnimation from './LoadAnimation';\nimport type { RelatedItems } from '../types/RelatedItems';\nimport RelatedMedia from './RelatedMedia';\nimport RelatedOrganizations from './RelatedOrganizations';\nimport RelatedPeople from './RelatedPeople';\nimport RelatedPlaces from './RelatedPlaces';\nimport RelatedTaxonomies from './RelatedTaxonomies';\nimport './RelatedItemsList.css';\n\ntype Props = {\n /**\n * A list of related items.\n */\n items: Array<RelatedItems>\n};\n\n/**\n * This component renders the passed list of related items in an accordion fashion.\n */\nconst RelatedItemsList = (props: Props) => {\n if (_.isEmpty(props.items)) {\n return null;\n }\n\n return (\n <Accordion.Root\n className='related-items-list'\n type='multiple'\n >\n { _.map(props.items, ({ data, error, ...conf }) => (\n <Accordion.Item\n key={conf.endpoint}\n value={conf.endpoint}\n >\n <Accordion.Header>\n <Accordion.Trigger\n className='accordion-trigger border-black/20 border border-t border-b-0 border-l-0 border-r-0 border-solid\n rounded-none w-full flex justify-between items-center px-3 py-3 text-sm'\n >\n <div>\n { conf.ui_label }\n { data && (\n <span className='ml-1'>\n { i18n.t('RelatedItemsList.labels.count', { count: data.items?.length })}\n </span>\n )}\n { error && (\n <AlertCircle\n className='inline ml-1.5 h-4 w-4 text-red-600 align-text-bottom'\n />\n )}\n { !(data || error) && (\n <LoadAnimation\n className='text-muted/60 ml-4'\n />\n )}\n </div>\n <ChevronDown\n className='accordion-chevron h-4 w-4'\n />\n </Accordion.Trigger>\n </Accordion.Header>\n <Accordion.Content\n className='accordion-content text-sm leading-6'\n >\n { conf.endpoint === 'media_contents' && (\n <RelatedMedia\n data={data}\n />\n )}\n { conf.endpoint === 'organizations' && (\n <RelatedOrganizations\n data={data}\n />\n )}\n { conf.endpoint === 'people' && (\n <RelatedPeople\n data={data}\n />\n )}\n { conf.endpoint === 'places' && (\n <RelatedPlaces\n data={data}\n />\n )}\n { conf.endpoint === 'taxonomies' && (\n <RelatedTaxonomies\n data={data}\n />\n )}\n </Accordion.Content>\n </Accordion.Item>\n ))}\n </Accordion.Root>\n );\n};\n\nexport default RelatedItemsList;\n","// @flow\n\nimport { Image, X } from 'lucide-react';\nimport React, { useMemo, useRef } from 'react';\nimport _ from 'underscore';\nimport type { Place } from '../types/Place';\nimport type { RelatedItems } from '../types/RelatedItems';\nimport RelatedItemsList from './RelatedItemsList';\n\ntype Props = {\n /**\n * The place record to render.\n */\n place?: Place,\n\n /**\n * A list of items related to the place.\n */\n related: Array<RelatedItems>,\n\n /**\n * Callback fired when the panel is closed.\n */\n onClose: () => void\n};\n\n/**\n * This component renders a side panel for the passed Core Data place record.\n */\nconst PlaceDetailsPanel = (props: Props) => {\n const el = useRef<HTMLElement>(null);\n\n /**\n * Returns the first image for the passed related items.\n */\n const firstImage = useMemo(() => {\n const images = props.related.find((i) => i.endpoint === 'media_contents' && !_.isEmpty(i.data?.items));\n return images ? (images.data && images.data.items[0].body) : undefined;\n }, [props.related]);\n\n /**\n * Sets the user defined field values.\n *\n * @type {UserDefinedField[]|*[]}\n */\n const userDefined = useMemo(() => (\n props.place?.user_defined ? Object.values(props.place.user_defined) : []\n ), [props.place]);\n\n return (\n <aside\n className='flex flex-col absolute z-10 h-full w-[280px] bg-white/80 backdrop-blur shadow overflow-y-auto'\n ref={el}\n >\n <button\n className='absolute top-2 right-2 p-1.5 rounded-full z-10 bg-slate-200/60 hover:bg-slate-200 focus:outline-2 focus:outline-offset-2 focus:outline-teal-700'\n onClick={props.onClose}\n type='button'\n >\n <X className='h-4 w-4' />\n </button>\n { props.place && (\n <>\n { firstImage && (\n <div\n className='relative w-full h-[200px] flex-grow-0 flex-shrink-0 bg-muted/20 z-0'\n >\n <div\n className='absolute top-0 left-0 w-full h-full flex justify-center items-center'\n >\n <Image\n className='h-20 w-20 text-gray-400'\n strokeWidth={1}\n />\n </div>\n <div\n className='absolute top-0 left-0 w-full h-full flex justify-center items-center'\n >\n <img\n className='object-cover h-full w-full'\n src={firstImage.content_url}\n alt={firstImage.title}\n />\n </div>\n </div>\n )}\n <div\n className='p-3'\n >\n <h1\n className='pr-6 font-medium'\n >\n { props.place.properties.title }\n </h1>\n <ol\n className='text-sm mt-4 leading-6 overflow-hidden'\n >\n { _.map(userDefined, ({ label, value }) => (\n <li\n key={label}\n className='mb-2'\n >\n <div\n className='text-muted'\n >\n { label }\n </div>\n <div\n className='font-medium overflow-hidden text-ellipsis'\n >\n { value }\n </div>\n </li>\n ))}\n </ol>\n </div>\n <RelatedItemsList\n items={props.related}\n />\n </>\n )}\n </aside>\n );\n};\n\nexport default PlaceDetailsPanel;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@peripleo/maplibre\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@performant-software/geospatial\");","// @flow\n\nimport { useMap } from '@peripleo/maplibre';\nimport { LocationMarker } from '@performant-software/geospatial';\nimport React, { useCallback, useEffect, useState } from 'react';\n\ntype Props = {\n /**\n * The URL of the Core Data place record.\n */\n url: string\n};\n\n/**\n * This component renders a map marker for a given Core Data Place record.\n */\nconst PlaceMarker = (props: Props) => {\n const [place, setPlace] = useState();\n\n /**\n * Converts the passed data to a feature collection and sets it on the state.\n *\n * @type {(function(*): void)|*}\n */\n const onLoad = useCallback((data) => {\n const featureCollection = {\n type: 'FeatureCollection',\n features: [{\n ...data,\n properties: {\n ...data.properties,\n record_id: data.record_id\n }\n }]\n };\n\n setPlace(featureCollection);\n }, []);\n\n /**\n * Fetch the place record from the passed URL.\n */\n useEffect(() => {\n fetch(props.url)\n .then((res) => res.json())\n .then(onLoad);\n }, [props.url]);\n\n if (!place) {\n return null;\n }\n\n return (\n <LocationMarker\n data={place}\n useMap={useMap}\n />\n );\n};\n\nexport default PlaceMarker;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-instantsearch\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-virtualized-auto-sizer\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-window\");","// @flow\n\nimport React, { useMemo } from 'react';\nimport { Highlight } from 'react-instantsearch';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { FixedSizeList } from 'react-window';\nimport _ from 'underscore';\nimport type { Feature } from '../types/Feature';\nimport type { Place } from '../types/typesense/Place';\nimport './PlaceResultsList.css';\n\n/**\n * Converts the passed place result to a feature.\n *\n * @param result\n *\n * @returns {{\n * geometry: {coordinates: number[], type: string},\n * id: number,\n * type:\n * string,\n * properties: {\n * ccode: *[],\n * record_id: string,\n * names: *,\n * name: string,\n * id: string,\n * title: string,\n * type: string,\n * uuid: string\n * }\n * }}\n */\nconst toFeature = (result: Place) => ({\n id: parseInt(result.record_id, 10),\n type: 'Feature',\n properties: {\n id: result.record_id,\n ccode: [],\n title: result.name,\n uuid: result.uuid,\n record_id: result.record_id,\n name: result.name,\n names: _.map(result.names, (toponym) => ({ toponym })),\n type: result.type\n },\n geometry: {\n type: 'Point',\n coordinates: result.coordinates.slice().reverse()\n }\n});\n\ntype HitComponentProps = {\n hit: any,\n isHovered: boolean,\n onClick: () => void\n};\n\nconst HitComponent = (props: HitComponentProps) => {\n const { hit } = props;\n\n const className = useMemo(() => {\n const classNames = [\n 'h-[5.5em]',\n 'border-b',\n 'flex',\n 'flex-col',\n 'justify-start'\n ];\n\n if (props.isHovered) {\n classNames.add('bg-teal-700/30');\n }\n\n return classNames.join(' ');\n }, [props.isHovered]);\n\n return (\n <div\n className={className}\n >\n <button\n className='py-2 px-3 flex-grow text-left inline-flex flex-col'\n onClick={props.onClick}\n type='button'\n >\n <Highlight\n attribute='name'\n className='line-clamp-2'\n hit={hit}\n />\n <p\n className='text-muted text-xs line-clamp-1'\n >\n <Highlight\n hit={hit}\n attribute='names'\n />\n </p>\n </button>\n </div>\n );\n};\n\ntype Props = {\n /**\n * An array of search results representing `/typesense/Place` objects.\n */\n hits: Array<Place>,\n\n /**\n * The object that is currently occupying the hover state.\n */\n hover?: Feature<{ id: string }>,\n\n /**\n * Callback fired when the hover item is changed.\n */\n onHoverChange: (hover?: Feature<{ id: string }>) => void,\n\n /**\n * Callback fired when a search result is clicked.\n */\n onClick: (result: Place) => void\n};\n\ntype RowProps = {\n index: number,\n style: any\n};\n\n/**\n * This component renders a list of search results returned from a Core Data Typesense index.\n */\nconst PlaceResultsList = (props: Props) => {\n const {\n hits,\n hover,\n onClick,\n onHoverChange\n } = props;\n\n const Row = ({ index, style }: RowProps) => {\n const hit = hits[index];\n const id = parseInt(hit.record_id, 10);\n\n return (\n <div\n style={style}\n onPointerEnter={() => onHoverChange(hover?.id === id ? hover : toFeature(hit))}\n onPointerLeave={() => onHoverChange(undefined)}\n >\n <HitComponent\n hit={hit}\n isHovered={hover?.id === parseInt(hit?.record_id, 10)}\n onClick={() => onClick(hit)}\n />\n </div>\n );\n };\n\n return (\n <AutoSizer>\n {({ height, width }) => (\n <FixedSizeList\n height={height}\n itemCount={hits.length}\n width={width}\n itemSize={88}\n >\n { Row }\n </FixedSizeList>\n )}\n </AutoSizer>\n );\n};\n\nexport default PlaceResultsList;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","props","className","concat","trim","React","Dialog","onOpenChange","onClose","open","Boolean","defaultItem","Image","title","Viewer","iiifContent","manifest_url","options","informationPanel","asChild","type","X","resources","en","translation","i18n","i18next","init","debug","fallbackLng","lng","interpolation","escapeValue","RelatedMedia","_props$data","_useState2","useState","showGallery","setShowGallery","_","data","items","item","Thumbnail","body","id","onClick","thumbnail","content_thumbnail_url","width","thumbnailWidth","height","thumbnailHeight","MediaGallery","undefined","defaultProps","emptyMessage","renderItem","RelatedList","t","organization","Building2","person","UserCircle","place","MapPin","taxonomy","ListTree","Accordion","_ref","_data$items","error","conf","_objectWithoutProperties","_excluded","endpoint","ui_label","count","length","AlertCircle","LoadAnimation","ChevronDown","RelatedOrganizations","RelatedPeople","RelatedPlaces","RelatedTaxonomies","el","useRef","firstImage","useMemo","images","related","find","i","_i$data","userDefined","_props$place","user_defined","values","ref","strokeWidth","src","content_url","alt","properties","label","RelatedItemsList","setPlace","onLoad","useCallback","featureCollection","features","_objectSpread","record_id","useEffect","fetch","url","then","res","json","LocationMarker","useMap","HitComponent","hit","classNames","isHovered","add","join","Highlight","attribute","hits","hover","onHoverChange","Row","index","style","parseInt","onPointerEnter","result","ccode","name","uuid","names","toponym","geometry","coordinates","slice","reverse","onPointerLeave","AutoSizer","_ref2","FixedSizeList","itemCount","itemSize"],"sourceRoot":""}