contacts-pane 3.2.1-3 → 3.2.1-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1 +1,1155 @@
1
- const e=require("./contactsPane.cjs.js");module.exports=e.default;
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.contactPane .namedPane{border:var(--border-width-sm) solid var(--color-text-muted);border-radius:var(--border-radius-base)}.contactPane .personaRow{padding:var(--spacing-xs)}.contactPane .personaRow--webid,.contactPane .personaRow--webid td,.contactPane .personaRow--webid button,.contactPane .personaRow--webid button:hover{background-color:var(--color-info-bg)!important}.contactPane .personaRow--webid .hoverControl:has(>img:first-child){background-color:var(--color-info-bg)!important}.contactPane .personaRow--webid .hoverControl:has(>img:first-child):hover{background-color:var(--color-info-bg)!important}.contactPane .personaRow--webid .personaOpenButton:has(>img:first-child){background-color:var(--color-info-bg)!important}.contactPane .personaRow--webid .personaOpenButton:has(>img:first-child):hover{background-color:var(--color-info-bg)!important}.contactPane .fullWidth{width:100%}.contactPane .personaOpenButton{float:right;background-color:#0000;border:none}.contactPane .webidControl div[style*="position: relative"]>div[style*="display: grid"]{z-index:9999!important;pointer-events:auto!important;opacity:1!important;visibility:visible!important;padding:var(--spacing-btn)!important;background:var(--color-background)!important;border:var(--border-width-sm) solid var(--color-primary)!important;border-radius:var(--border-radius-base)!important;min-width:12em!important;box-shadow:var(--box-shadow-popup)!important;gap:var(--spacing-xxs)!important;grid-template-columns:auto auto!important;display:grid!important;position:absolute!important;top:0!important;left:auto!important;right:0!important}.contactPane .contactPanedHeading{font-size:var(--font-size-lg);color:var(--color-primary);margin:var(--spacing-sm) 0;font-weight:700}.contactPane .webidPrompt{padding:var(--spacing-sm);font-size:var(--font-size-base);white-space:pre-wrap;border:none}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane,.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) table td div.contactPane.namedPane{box-sizing:border-box;margin-top:var(--spacing-sm);display:block;container:nested-profile-pane/inline-size;width:100%!important;min-width:0!important;max-width:none!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profile-grid,.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane #main-content.profile-grid{gap:var(--spacing-sm)!important;flex-direction:column!important;display:flex!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profile__main,.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profile__sidebar,.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profile__section{box-sizing:border-box;overflow-wrap:anywhere;width:100%!important;min-width:0!important;max-width:100%!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profile__sidebar,.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profile__section,.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profile__main{padding:var(--spacing-sm)!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profileSectionCollapsible[data-expanded=false] .profileSectionCollapsible__content{display:none!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profileSectionCollapsible__toggle{justify-content:center;align-items:center;min-width:auto!important;min-height:auto!important;padding:var(--spacing-xxs)!important;color:var(--color-text)!important;background:0 0!important;border:none!important;display:inline-flex!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profileSectionCollapsible[data-expanded=true] .profileSectionCollapsible__chevron{transform:rotate(180deg)}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profileSectionCollapsible__editLabel{display:none!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .profileSectionCollapsible__editIcon{display:inline!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .socialItem{flex:none!important;align-items:center!important;display:flex!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .socialItem a{width:auto!important;min-width:var(--min-touch-target)!important;min-height:var(--min-touch-target)!important;flex:none!important;justify-content:center!important;align-items:center!important;line-height:0!important;display:inline-flex!important}.contactPane :is(.contactPane--narrow .webidControl,.webidControl.webidControl--mobile) .namedPane .socialIcon{object-fit:contain!important;flex-shrink:0!important;width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;min-height:40px!important;max-height:40px!important;display:block!important}@media (width<=1000px){.contactPane .webidControl,.contactPane .webidControl table,.contactPane .webidControl tbody,.contactPane .webidControl tr,.contactPane .webidControl td{box-sizing:border-box;width:100%;min-width:0;max-width:100%}.contactPane .webidControl table{table-layout:fixed}.contactPane .webidControl .personaRow--webid td{vertical-align:top}.contactPane .webidControl .contactPane,.contactPane .webidControl .contactPane .addressBook-grid,.contactPane .webidControl .contactPane .detailSection,.contactPane .webidControl .contactPane .detailsSectionContent{box-sizing:border-box;width:100%!important;min-width:0!important;max-width:100%!important}.contactPane .webidControl .contactPane .addressBook-grid{flex-flow:column!important}.contactPane .webidControl .contactPane .detailSection,.contactPane .webidControl .contactPane .addressBookSection{flex:none!important}.contactPane .webidControl .contactPane .detailsSectionContent,.contactPane .webidControl .contactPane .detailsSectionContent--wide{padding:var(--spacing-sm)!important;overflow-y:visible!important}}@container nested-profile-pane (width<=900px){.contactPane .webidControl .profile-grid{gap:var(--spacing-sm)!important;flex-direction:column!important;display:flex!important}.contactPane .webidControl .profile-grid>*{min-width:0!important;max-width:100%!important}.contactPane .webidControl .profile__main,.contactPane .webidControl .profile__sidebar,.contactPane .webidControl .profile__section{overflow-wrap:anywhere;width:100%!important;min-width:0!important;max-width:100%!important}}.contactPane .collapsed{visibility:collapse}.focus-trap{z-index:9999;background:var(--overlay-bg);justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:fixed;top:0;left:0}.focus-trap .modal{background:var(--color-background);padding:var(--spacing-lg);border-radius:var(--border-radius-base);max-width:90%;box-shadow:var(--box-shadow-modal)}#contacts-modal #modal-buttons{margin-top:var(--spacing-md);justify-content:center;gap:var(--spacing-sm);display:flex}#contacts-modal .modal button{min-height:var(--min-touch-target);padding:var(--spacing-sm) var(--spacing-md);border:1px solid var(--color-primary);border-radius:var(--border-radius-base);font-weight:var(--font-weight-bold,600);cursor:pointer;transition:all var(--animation-duration) ease}#contacts-modal .modal button:disabled{opacity:var(--opacity-disabled);cursor:not-allowed;transform:none}.contactPane .mugshotImage{border-radius:var(--border-radius-full);max-height:10rem;margin:var(--spacing-sm)}.contactPane button:has(>img[src$=\\.svg]){background-color:var(--color-section-bg)!important;border:none!important;border-radius:0!important;margin:0!important}.contactPane .group-membership-container{padding:var(--spacing-sm) 0}.contactPane .group-pills-wrapper{margin:0;padding:0;list-style:none;gap:var(--spacing-sm)!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;width:100%!important;display:grid!important}.contactPane .group-pills-wrapper span{width:max-content!important}.contactPane .group-membership-item{flex-direction:column;align-items:stretch;max-width:16rem;display:flex}.contactPane .group-membership-item>button{text-align:center;border-radius:var(--border-radius-base);word-wrap:break-word;overflow-wrap:break-word;width:100%;min-height:var(--min-touch-target)}.contactPane .group-membership-item .group-membership-toolbar{align-items:center;gap:var(--spacing-xs);padding:var(--spacing-xs) 0 0 0;display:flex}.contactPane .group-membership-item .group-membership-toolbar a{margin:.3rem .3rem .3rem 1rem}.contactPane .group-membership-item .group-membership-toolbar a img{width:1.3rem;height:1rem;margin:0}.contactPane .group-membership-item .group-membership-toolbar>img.hoverControlHide,.contactPane .group-membership-item .group-membership-toolbar>[data-testid=deleteButtonWithCheck]{float:none!important;visibility:hidden!important;margin:0!important;display:inline-flex!important}.contactPane .group-membership-item .group-membership-toolbar:hover>img.hoverControlHide,.contactPane .group-membership-item .group-membership-toolbar:hover>[data-testid=deleteButtonWithCheck]{visibility:visible!important}.contactPane .detailsSectionContent .group-membership-item .group-membership-toolbar>div[style*="position: relative"]{z-index:1000;justify-content:center;align-items:center;display:flex;width:min(90vw,27.5rem)!important;min-width:17.5rem!important;max-width:90vw!important;position:absolute!important;top:0!important;left:50%!important;transform:translate(-50%)!important}.contactPane .detailsSectionContent .group-membership-item .group-membership-toolbar>div[style*="position: relative"]>div{background:var(--color-background);border-radius:var(--border-radius-full);padding:var(--spacing-lg);box-shadow:var(--box-shadow-overlay);z-index:1001;min-width:17.5rem!important;position:relative!important;top:auto!important}@media (width<=599px){.contactPane .group-membership-item .group-pills-wrapper{gap:var(--spacing-xs)!important;grid-template-columns:repeat(2,1fr)!important;max-width:100%!important}.contactPane .group-membership-item .group-membership-item>button{font-size:var(--font-size-sm)!important;border-radius:var(--border-radius-base)!important}}@media (width>=900px){.contactPane .group-membership-item .group-pills-wrapper{gap:var(--spacing-sm)!important;grid-template-columns:repeat(3,1fr)!important}}.individualPane{padding:var(--spacing-xs) var(--spacing-lg) var(--spacing-md) var(--spacing-lg);background:var(--color-section-bg);border-radius:var(--border-radius-full);box-shadow:var(--box-shadow);box-sizing:border-box;max-width:100%}.individualPane .formFieldValue>div[style*="flex-direction: row"],.contactPane .formFieldValue>div[style*="flex-direction: row"]{align-items:center;display:flex}.individualPane .formFieldValue input[data-testid=autocomplete-input],.contactPane .formFieldValue input[data-testid=autocomplete-input]{vertical-align:middle}.individualPane .hoverControl,.contactPane .hoverControl{position:relative}.contactPane td.hoverControl:has(>a){justify-content:space-between!important;width:auto!important;min-width:4rem!important}.contactPane td.hoverControl:has(>a)>a{overflow-wrap:anywhere;word-break:break-word;white-space:normal;flex:auto;min-width:0}:is(.individualPane .hoverControl:has(>img:first-child),.contactPane .hoverControl:has(>img:first-child)){min-height:var(--min-touch-target);min-width:var(--min-touch-target);cursor:pointer;justify-content:center;align-items:center;display:inline-flex;padding:var(--spacing-btn)!important;background-color:#0000!important;border:none!important;border-radius:0!important;margin:0!important}:is(.individualPane .hoverControl:has(>img:first-child)>span,.contactPane .hoverControl:has(>img:first-child)>span){margin-left:var(--spacing-xxs);align-items:center;display:inline-flex}:is(.individualPane div[style*="padding: 0.5em"]:has(>img),.contactPane div[style*="padding: 0.5em"]:has(>img)){align-items:center;display:inline-flex}:is(.individualPane div[style*="padding: 0.5em"]:has(>img)>span,.contactPane div[style*="padding: 0.5em"]:has(>img)>span){margin-left:var(--spacing-xxs)}:is(.individualPane .hoverControl:has(>img:first-child):hover,.contactPane .hoverControl:has(>img:first-child):hover){background-color:var(--color-section-bg)!important}:is(.individualPane button:has(>img[src$=\\.svg]),.contactPane button:has(>img[src$=\\.svg])){transition:background-color .2s,box-shadow .2s;background-color:var(--color-section-bg)!important;box-shadow:none!important;border:none!important;border-radius:0!important;margin:0!important}.contactPane img[src$=red\\.svg],.contactPane img[src$=go-to-this\\.png],.individualPane img[src$=red\\.svg],.individualPane img[src$=go-to-this\\.png]{object-fit:contain;vertical-align:middle;display:inline-block;width:1.2rem!important;max-width:none!important;height:1.2rem!important;max-height:none!important}:is(.individualPane .statsLog button:has(>img[src$=\\.svg]),.contactPane .statsLog button:has(>img[src$=\\.svg])){background-color:var(--color-info-bg)!important;border:initial!important;margin:initial!important;border-radius:initial!important}:is(.individualPane button:has(>img[title=Continue]),.contactPane button:has(>img[title=Continue])){display:none!important}.contactPane .detailSection .detailsSectionContent img[title=Continue]{display:inline-flex!important}.contactPane .detailSection .detailsSectionContent button:has(>img[title=Continue]){display:inline-flex!important}.contactPane .detailSection .detailsSectionContent img[title=Continue]{width:var(--icon-base,2rem)!important;height:var(--icon-base,2rem)!important}:is(.individualPane .contactFormContainer button:has(>img[src$=noun_1180158\\.svg]),.contactPane .contactFormContainer button:has(>img[src$=noun_1180158\\.svg]),.individualPane .contactFormContainer button:has(>img[title=Continue]),.contactPane .contactFormContainer button:has(>img[title=Continue])),:is(.individualPane .statsLog button:has(>img[title=Continue]),.contactPane .statsLog button:has(>img[title=Continue]),.individualPane .webidControl button:has(>img[title=Continue]),.contactPane .webidControl button:has(>img[title=Continue])){display:inline-flex!important}.individualPane button,.contactPane button{min-height:var(--min-touch-target);min-width:var(--min-touch-target)}.individualPane input:not([type=color]),.contactPane input:not([type=color]){box-sizing:border-box;width:99%;min-width:0;max-width:99%;font:inherit;color:var(--color-text);border:var(--border-width-sm) solid var(--color-border-pale);background-color:var(--color-card-bg)!important;margin-left:0!important;margin-right:0!important}.individualPane textarea,.contactPane textarea,.individualPane .formFieldValue textarea,.contactPane .formFieldValue textarea{appearance:none;box-sizing:border-box;width:99%;max-width:99%;font:inherit;color:var(--color-text);margin-top:var(--spacing-xs);border-radius:var(--border-radius-sm)!important;border:var(--border-width-xthin) solid var(--color-border-accent)!important;background-color:var(--color-card-bg)!important;padding:var(--spacing-xs)!important;margin:0!important}.individualPane select,.contactPane select{box-sizing:border-box;min-width:0;max-width:99%;font:inherit;color:var(--color-text);border:var(--border-width-sm) solid var(--color-border-pale);background-color:var(--color-card-bg)!important}.individualPane input[type=date],.contactPane input[type=date],.individualPane input[type=month],.contactPane input[type=month],.individualPane input[type=week],.contactPane input[type=week],.individualPane input[type=time],.contactPane input[type=time],.individualPane input[type=datetime-local],.contactPane input[type=datetime-local]{min-height:var(--min-touch-target)}.individualPane button:focus-visible,.contactPane button:focus-visible,.individualPane input:not([type=color]):focus-visible,.contactPane input:not([type=color]):focus-visible,.individualPane textarea:focus-visible,.contactPane textarea:focus-visible,.individualPane select:focus-visible,.contactPane select:focus-visible{outline-offset:2px;box-shadow:0 0 0 1px var(--color-background);outline:var(--focus-ring-width) solid var(--color-primary)!important}.individualPane .hoverControl:has(>img:first-child):focus-visible{outline-offset:2px;box-shadow:0 0 0 1px var(--color-background);outline:var(--focus-ring-width) solid var(--color-primary)!important}.contactPane .hoverControl:has(>img:first-child):focus-visible{outline-offset:2px;box-shadow:0 0 0 1px var(--color-background);outline:var(--focus-ring-width) solid var(--color-primary)!important}.individualPane input[type=url],.contactPane input[type=url]{width:99%}.individualPane .formFieldValue,.contactPane .formFieldValue{min-width:0;margin-bottom:var(--spacing-sm)}.individualPane .formFieldValue table,.contactPane .formFieldValue table{margin:0!important;padding:0!important}.individualPane .formFieldValue td,.contactPane .formFieldValue td{vertical-align:middle;padding:0!important}.individualPane .formFieldValue table[data-testid=autocomplete-table],.contactPane .formFieldValue table[data-testid=autocomplete-table]{height:100%}.individualPane .formFieldValue input:not([type=color]),.contactPane .formFieldValue input:not([type=color]),.individualPane .formFieldValue textarea,.contactPane .formFieldValue textarea{max-width:99%;width:99%!important}:is(.individualPane .formFieldName:has(a[href="http://www.w3.org/2006/vcard/ns#value"])+.formFieldValue input:not([type=color]),.contactPane .formFieldName:has(a[href="http://www.w3.org/2006/vcard/ns#value"])+.formFieldValue input:not([type=color])){max-width:98%;width:98%!important}.individualPane .formFieldValue select,.contactPane .formFieldValue select{width:99%;display:inline-block;max-width:none!important}.individualPane select#formSelect,.contactPane select#formSelect{box-sizing:border-box;width:99%;max-width:98%;margin-left:0!important;margin-right:0!important}.individualPane span select,.contactPane span select{box-sizing:border-box;max-width:96%!important;margin:0!important}.individualPane .formFieldValue span select,.contactPane .formFieldValue span select{margin-left:0!important;margin-right:0!important}.individualPane>div:first-of-type,.contactPane>div:first-of-type,.individualPane>div:first-of-type>div:first-of-type,.contactPane>div:first-of-type>div:first-of-type,.individualPane>div,.contactPane>div{border:none!important;padding:0!important}:is(.individualPane :not(.choiceBox):has(>.formFieldName):has(>.formFieldValue),.contactPane :not(.choiceBox):has(>.formFieldName):has(>.formFieldValue)){margin-bottom:var(--spacing-sm);align-items:baseline;display:flex}.individualPane .choiceBox .classifierBox-label,.contactPane .choiceBox .classifierBox-label{padding-left:var(--spacing-xxs);margin-right:0}.individualPane .choiceBox .choiceBox-selectBox select,.contactPane .choiceBox .choiceBox-selectBox select{margin-left:2.1rem!important}.individualPane .classifierBox .classifierBox-label,.contactPane .classifierBox .classifierBox-label{padding-left:var(--spacing-xxs);width:8rem;padding:var(--spacing-xxs);vertical-align:middle;margin-right:0}.individualPane .classifierBox .classifierBox-selectBox,.contactPane .classifierBox .classifierBox-selectBox,.individualPane .classifierBox .classifierBox-selectBox select,.contactPane .classifierBox .classifierBox-selectBox select,.individualPane .formFieldValue>span>select,.contactPane .formFieldValue>span>select{margin-left:0!important}:is(.individualPane :not(.choiceBox):has(>.formFieldName):has(>.formFieldValue)>.formFieldValue,.contactPane :not(.choiceBox):has(>.formFieldName):has(>.formFieldValue)>.formFieldValue){margin-bottom:0}:is(.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://schema.org/"]),.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://schema.org/"]),.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/ns/solid/terms#"]),.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/ns/solid/terms#"]),.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://xmlns.com/foaf/0.1/"]),.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://xmlns.com/foaf/0.1/"]),.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/2006/vcard/ns"]),.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/2006/vcard/ns"]),.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/ns/org#"]),.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/ns/org#"])){vertical-align:middle;align-items:center;display:inline-flex}:is(.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://schema.org/"])+.formFieldValue,.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://schema.org/"])+.formFieldValue,.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/ns/solid/terms#"])+.formFieldValue,.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/ns/solid/terms#"])+.formFieldValue,.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://xmlns.com/foaf/0.1/"])+.formFieldValue,.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://xmlns.com/foaf/0.1/"])+.formFieldValue,.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/2006/vcard/ns"])+.formFieldValue,.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/2006/vcard/ns"])+.formFieldValue,.individualPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/ns/org#"])+.formFieldValue,.contactPane :not(.choiceBox)>.formFieldName:has(a[href*="http://www.w3.org/ns/org#"])+.formFieldValue){vertical-align:middle;flex:1;align-items:center;min-width:0;display:inline-flex}:is(.individualPane div[style*="display: flex"][style*="flex-direction: row"]:has(textarea),.contactPane div[style*="display: flex"][style*="flex-direction: row"]:has(textarea)){align-items:flex-start}:is(.individualPane div[style*="display: flex"][style*="flex-direction: row"]:has(textarea)>div:has(>a),.contactPane div[style*="display: flex"][style*="flex-direction: row"]:has(textarea)>div:has(>a)){padding-left:var(--spacing-xs);padding-top:var(--spacing-sm)}:is(.individualPane :not(.choiceBox):has(>.formFieldValue input[data-testid=autocomplete-input]),.contactPane :not(.choiceBox):has(>.formFieldValue input[data-testid=autocomplete-input])){align-items:flex-start}:is(.individualPane :not(.choiceBox):has(>.formFieldValue input[data-testid=autocomplete-input])>.formFieldName,.contactPane :not(.choiceBox):has(>.formFieldValue input[data-testid=autocomplete-input])>.formFieldName){padding-top:var(--spacing-xs)!important}:is(.individualPane .formFieldValue:has(input[data-testid=autocomplete-input]),.contactPane .formFieldValue:has(input[data-testid=autocomplete-input])){align-self:flex-start}.individualPane .formFieldValue table[data-testid=autocomplete-table],.contactPane .formFieldValue table[data-testid=autocomplete-table],.individualPane .formFieldValue input[data-testid=autocomplete-input],.contactPane .formFieldValue input[data-testid=autocomplete-input]{margin:0!important}.individualPane .formFieldValue table[data-testid=autocomplete-table],.contactPane .formFieldValue table[data-testid=autocomplete-table]{vertical-align:baseline}.individualPane input:disabled,.contactPane input:disabled,.individualPane textarea:disabled,.contactPane textarea:disabled,.individualPane select:disabled,.contactPane select:disabled,.individualPane input[readonly],.contactPane input[readonly],.individualPane textarea[readonly],.contactPane textarea[readonly],.individualPane input:read-only,.contactPane input:read-only,.individualPane textarea:read-only,.contactPane textarea:read-only{cursor:not-allowed;opacity:var(--opacity-input-disabled);background-color:var(--color-background)!important;border:var(--border-width-xthin) solid var(--color-background)!important}.contactPane .webidControl table td div.contactPane.namedPane{border:none!important}.individualPane div[style*="position: relative"]:has(>div[style*="display: grid"]){position:static!important}.individualPane div[style*="position: relative"]>div[style*="display: grid"]{z-index:9999!important;pointer-events:auto!important;opacity:1!important;visibility:visible!important;padding:var(--spacing-btn)!important;background:var(--color-background)!important;border:var(--border-width-sm) solid var(--color-primary)!important;border-radius:var(--border-radius-base)!important;box-shadow:var(--box-shadow-popup)!important;gap:var(--spacing-xxs)!important;grid-template-columns:auto auto!important;display:grid!important;position:absolute!important;top:0!important;left:auto!important;right:0!important}.individualPane .hoverControl img.hoverControlHide,.individualPane .hoverControl [data-testid=deleteButtonWithCheck]{justify-content:center;align-items:center;right:var(--spacing-xxxs)!important;width:var(--icon-xs,1.5rem)!important;height:var(--icon-xs,1.5rem)!important;float:none!important;z-index:2!important;margin:0!important;display:none!important;position:absolute!important}.individualPane .hoverControl:hover img.hoverControlHide,.individualPane .hoverControl:hover [data-testid=deleteButtonWithCheck]{display:inline-flex!important}.individualPane .hoverControl:has(>div:first-child:nth-last-child(2)):hover>img.hoverControlHide{top:50%!important;right:var(--spacing-xxxs)!important;left:auto!important;transform:translateY(-50%)!important}.individualPane .hoverControl:has(>div:first-child:nth-last-child(2)):hover>[data-testid=deleteButtonWithCheck]{top:50%!important;right:var(--spacing-xxxs)!important;left:auto!important;transform:translateY(-50%)!important}.contactPane .statsLog{font-size:var(--font-size-lg);margin:var(--spacing-md);background-color:var(--color-background)}.contactPane .statsLog pre{padding:var(--spacing-md);white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;max-width:100%;overflow:hidden}.contactPane .toolsPane{gap:var(--spacing-xs);flex-direction:column;display:flex}.contactPane .toolsButtonsContainer{gap:var(--spacing-xs);flex-wrap:wrap;display:flex}.contactPane .toolsButton--error{background-color:var(--color-error)}.contactPane .toolsButton--success{background-color:var(--color-primary)}.contactPane table tr[tabindex="0"]:focus{outline:var(--focus-ring-width) solid var(--color-primary);outline-offset:2px;background:var(--color-info-bg)}.contactPane .peopleSection .selected{background-color:var(--color-info-bg)!important}.contactPane .detailSection,.contactPane .addressBookSection{box-sizing:border-box;background:var(--color-section-bg);flex-direction:column;flex:1 1 0;align-items:stretch;min-width:0;display:flex}.contactPane .detailsSectionContent{min-height:12.5rem;padding:var(--spacing-lg);box-sizing:border-box;flex:auto;width:100%;max-width:56.25rem}.contactPane .detailsSectionContent--wide{max-width:56.25rem}.contactPane .cardFooter{align-items:center;gap:var(--spacing-xs);padding-top:var(--spacing-md);margin-top:var(--spacing-md);flex-wrap:nowrap;display:flex}.contactPane .detailsSectionContent{margin:0}.contactPane .contactTypeChooser{gap:var(--spacing-sm);flex-direction:column;max-width:22.5rem;display:flex}.contactPane .contactTypeChooser h3{margin:0 0 var(--spacing-xs) 0;font-size:var(--font-size-lg)}.contactPane .contactTypeSelect{height:var(--min-touch-target);border:var(--border-width-sm,1px) solid var(--color-border-pale);border-radius:var(--border-radius-base);padding:0 var(--spacing-sm);font-size:var(--font-size-sm);background:var(--color-section-bg)}.contactPane .allGroupsButton{border-radius:var(--border-radius-full)!important}.contactPane .searchDiv{position:relative}.contactPane .searchInput{height:var(--min-touch-target);border:var(--border-width-sm,1px) solid var(--color-border-pale);background-color:var(--color-section-bg);border-radius:var(--border-radius-base);padding:0 var(--spacing-sm) 0 2.125rem;font-size:var(--font-size-base);box-sizing:border-box;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23999' viewBox='0 0 24 24' width='20' height='20'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99c.41.41 1.09.41 1.5 0s.41-1.09 0-1.5l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");background-position:.5rem;background-repeat:no-repeat;background-size:1.25rem 1.25rem;width:100%}.contactPane .searchClearButton{right:var(--spacing-sm);font-size:var(--font-size-base);cursor:pointer;color:var(--color-text-muted);background:0 0;border:none;padding:0;line-height:1;display:block;position:absolute;top:50%;transform:translateY(-50%)}.contactPane .searchClearButton.hidden{display:none}.contactPane .searchClearButton:hover{color:var(--color-text)}.contactPane .contact-toolbar{align-items:center;gap:var(--spacing-sm);padding:var(--spacing-xs) 0;display:flex}.contactPane .contact-toolbar a{margin:.3rem}.contactPane .contact-toolbar a img{width:1.3rem;height:1rem;margin:0}.contact-toolbar .deleteButton{margin-left:auto;margin-right:var(--spacing-xxxs,.2rem);width:var(--icon-xxs,1rem);height:var(--icon-xxs,1rem);float:none}.contactPane .allGroupsButton{margin-left:var(--spacing-md);font-size:var(--font-size-base)}.contactPane .allGroupsButton--loading{background-color:var(--color-primary)}.contactPane .allGroupsButton--active{background-color:var(--color-primary);color:var(--color-background)}.contactPane .allGroupsButton--loaded{background-color:var(--color-primary)}.contactPane .claimSuccess{font-size:var(--font-size-xl)}.contactPane{flex-direction:column;min-height:0;display:flex}.contactPane .addressBook-grid{box-sizing:border-box;flex-wrap:nowrap;flex:1;align-items:stretch;width:100%;min-width:0;display:flex;overflow-x:hidden}@media (width>=500px) and (width<=900px){.contactPane .addressBookSection{max-width:900px}.contactPane .addressBookSection section{max-width:485px}}.contactPane.contactPane--narrow .addressBook-grid{flex-flow:column!important;min-width:0!important;overflow-x:hidden!important}.contactPane.contactPane--narrow .addressBookSection,.contactPane.contactPane--narrow .detailSection{flex:100%!important;width:100%!important;min-width:0!important;max-width:100%!important}@media (width<=1000px){.contactPane{min-height:auto!important}.contactPane .addressBook-grid{flex-flow:column!important;height:auto!important;min-height:auto!important}.contactPane .addressBookSection,.contactPane .detailSection{order:initial!important;flex:none!important;width:100%!important;min-width:0!important;max-width:100%!important}.contactPane .addressBookSection{min-height:auto!important;max-height:none!important;padding-bottom:var(--spacing-lg)!important;flex-direction:column!important;height:auto!important;display:flex!important;overflow-y:visible!important}.contactPane .peopleSection ul{max-height:50vh;overflow-y:auto}.contactPane .detailSection{min-height:auto!important;max-height:none!important;overflow-y:visible!important}.contactPane .detailsSectionContent{flex-direction:column!important;justify-content:flex-start!important;align-items:stretch!important;height:auto!important;min-height:auto!important;display:flex!important;overflow-y:visible!important}.contactPane .detailSection>.detailsSectionContent{padding-top:var(--spacing-sm)!important;box-sizing:border-box!important}.contactPane .actionButton,.contactPane .searchInput,.contactPane .flatButton,.contactPane .buttonSection button,.contactPane .groupButtonsList button{min-height:calc(var(--min-touch-target) + .5em)!important;padding:.875em 1em!important;font-size:1.5rem!important}.contactPane .group-membership-item .group-membership-toolbar>img.hoverControlHide,.contactPane .group-membership-item .group-membership-toolbar>[data-testid=deleteButtonWithCheck],.individualPane .hoverControl img.hoverControlHide,.individualPane .hoverControl [data-testid=deleteButtonWithCheck]{visibility:visible!important;opacity:1!important;display:inline-flex!important}}.contactPane .addressBookSection.section-bg{background:var(--color-section-bg);padding:var(--spacing-md);box-sizing:border-box;border:none!important;border-radius:0!important}.contactPane .detailSection,.contactPane .detailsSectionContent{flex-direction:column;justify-content:flex-start;align-items:stretch;display:flex}.contactPane .buttonSection{padding:var(--spacing-sm);-webkit-overflow-scrolling:touch;scrollbar-width:thin;flex-wrap:nowrap;align-items:center;margin-bottom:0;padding-bottom:0;display:flex;overflow:auto hidden}@media (width<=1000px){.contactPane .buttonSection{z-index:2;background:var(--color-section-bg);position:sticky;top:0;box-shadow:0 2px 4px -2px #0000000a}}.contactPane .buttonSection::-webkit-scrollbar{height:6px}.contactPane .buttonSection::-webkit-scrollbar-thumb{background:var(--color-border-pale);border-radius:var(--border-radius-base)}.contactPane .buttonSection::-webkit-scrollbar-track{background:0 0}.contactPane .buttonSection .selected{background:0 0!important}.contactPane .groupButtonsList{align-items:center;gap:var(--spacing-xs);flex-wrap:nowrap;list-style:none;display:flex}.contactPane .buttonSection .groupButtonsList{margin-left:var(--spacing-xs);margin-right:var(--spacing-xs);padding-left:0}.contactPane .groupButtonsList li{flex-shrink:0}.contactPane .groupButtonsList button{white-space:nowrap;flex-shrink:0;min-width:max-content;margin-left:0}.contactPane .detailsSectionContent .groupButtonsList{gap:var(--spacing-sm);box-sizing:border-box;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));width:100%;padding:0;list-style:none;display:grid}.contactPane .detailsSectionContent .groupButtonsList li{aspect-ratio:auto;align-items:stretch;gap:var(--spacing-xs);flex-direction:column;width:100%;display:flex}.contactPane .detailsSectionContent .groupButtonsList button{text-align:center;border-radius:var(--border-radius-base);word-wrap:break-word;overflow-wrap:break-word;width:100%;height:auto}.contactPane .detailsSectionContent .groupButtonsList li>img.hoverControlHide,.contactPane .detailsSectionContent .groupButtonsList li>img[data-testid=deleteButtonWithCheck]{align-self:flex-end;display:block;float:none!important;margin:0!important}@media (width<=599px){.contactPane .detailsSectionContent .groupButtonsList{gap:var(--spacing-xs);grid-template-columns:repeat(2,1fr)}.contactPane .detailsSectionContent .groupButtonsList button{font-size:var(--font-size-sm);border-radius:var(--border-radius-base)}}@media (width>=900px){.contactPane .detailsSectionContent .groupButtonsList{grid-template-columns:repeat(3,1fr)}}.contactPane .detailsSectionContent .newGroupBtn{box-sizing:border-box;width:100%;margin-top:var(--spacing-sm)}.contactPane .detailsSectionContent h3{font-size:var(--font-size-xl);margin-bottom:var(--spacing-sm);padding-left:0}.contactPane .detailSection{position:relative}.contactPane .webidControl div[style*="position: relative"]:has(>div[style*="display: grid"]){position:static!important}.contactPane .webidControl .personaRow--webid td>div[style*="position: relative"]>div,.contactPane .detailsSectionContent .groupButtonsList li>div[style*="position: relative"]>div,.contactPane .detailsSectionContent .contact-toolbar>div[style*="position: relative"]>div{z-index:9999!important;pointer-events:auto!important;opacity:1!important;visibility:visible!important;padding:var(--spacing-btn)!important;background:var(--color-background)!important;border:var(--border-width-sm) solid var(--color-primary)!important;border-radius:var(--border-radius-base)!important;min-width:12em!important;box-shadow:var(--box-shadow-popup)!important;gap:var(--spacing-xxs)!important;grid-template-columns:auto auto!important;display:grid!important;position:absolute!important;left:auto!important}.contactPane .detailsSectionContent .contact-toolbar>div[style*="position: relative"]>div>button:has(>img[src$=\\.svg]){background-color:#0000!important}.contactPane .detailsSectionContent .group-membership-item .group-membership-toolbar>div[style*="position: relative"]>div>button:has(>img[src$=\\.svg]){background-color:#0000!important}.contactPane .webidControl .personaRow--webid td>div[style*="position: relative"]>div>button:has(>img[src$=\\.svg]){background-color:#0000!important}.contactPane .allGroupsButton--selected{background-color:var(--color-primary);color:var(--color-background)}.contactPane .headerSection{background:var(--color-background);padding:var(--spacing-sm);border-top-left-radius:var(--border-radius-full);border-top-right-radius:var(--border-radius-full);margin-bottom:0}.contactPane .headerSection header{justify-content:space-between;align-items:center;margin-bottom:0;display:flex}.contactPane .headerSection h2{margin-bottom:0}.contactPane .dottedHr{border:none;border-top:var(--border-width-sm,.1rem) dotted var(--color-text-muted);margin:0}.contactPane .searchSection{padding:var(--spacing-sm);margin-bottom:0;padding-bottom:0}.contactPane .peopleSection{background:var(--color-background);border-top:1px dotted var(--color-text-muted);margin-bottom:0;display:flex}.contactPane .peopleSection ul{width:100%;max-height:70vh;margin:0;padding:0;list-style:none;overflow-y:auto}.contactPane .peopleSection li{border-top:var(--border-width-sm,.1rem) solid var(--color-border-pale);padding:var(--spacing-xs)}.contactPane .personLi-row{justify-content:space-between;align-items:center;display:flex}.contactPane .personLi-avatar{flex-shrink:0;justify-content:center;align-items:center;width:2.813rem;height:2.813rem;display:flex}.contactPane .personLi-avatar .avatar-placeholder{justify-content:center;align-items:center;width:2.25rem;height:2.25rem;display:flex}.contactPane .personLi-avatar img{object-fit:cover;border-radius:50%;width:2.5rem;height:2.5rem}.contactPane .personLi-info{margin-left:var(--spacing-sm);flex:1;overflow:hidden}.contactPane .personLi-name{font-weight:700;font-size:var(--font-size-base);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.contactPane .personLi-arrow{align-items:center;margin-left:auto;display:flex}.contactPane .personLi--error{opacity:.5}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("solid-logic"),l=require("solid-ui");l=s(l);let u=require("rdflib");u=s(u);function d(...e){console.log(...e)}function f(...e){console.warn(...e)}function p(...e){console.error(...e)}var m=l.ns,h=l.widgets,g=l.utils,_=c.store,v=h.publicData.wikidataClasses,y=h.publicData.wikidataParameters,b=`WebID`,x=`WikiData link`,S=l.icons.iconBase+`noun_1369241.svg`,C=l.icons.iconBase+`noun_1369237.svg`;async function w(e,t,n,r){try{new URL(t)}catch{throw Error(`${b}: ${t} is not a valid url.`)}d(`Adding to ${e} a ${b}: ${t}.`);let i=r.bnode(),a=[u.st(e,m.vcard(`url`),i,e.doc()),u.st(i,m.rdf(`type`),n,e.doc()),u.st(i,m.vcard(`value`),t,e.doc())],o=r.each(null,m.vcard(`hasMember`),e),s=[];o.forEach(n=>{s=s.concat(r.statementsMatching(n,m.vcard(`hasMember`),e,n.doc())),a.push(u.st(n,m.vcard(`hasMember`),r.sym(t),n.doc())),a.push(u.st(r.sym(t),m.owl(`sameAs`),e,n.doc()))});try{await Ee(s,a)}catch{throw Error(`Could not create webId ${b}: ${t}.`)}}async function T(e,t,n,r){d(`Removing from ${e} their ${b}: ${t}.`);let i=r.each(e,m.vcard(`url`),null,e.doc()).filter(t=>r.holds(t,m.rdf(`type`),n,e.doc())).filter(n=>r.holds(n,m.vcard(`value`),t,e.doc()));if(!i.length)throw Error(`Person ${e} does not have ${b} ${t}.`);let a=i[0],o=[u.st(e,m.vcard(`url`),a,e.doc()),u.st(a,m.rdf(`type`),n,e.doc()),u.st(a,m.vcard(`value`),t,e.doc())];await r.updater.update(o,[]);let s=r.each(null,m.vcard(`hasMember`),r.sym(t)),c=[],l=[];s.forEach(async n=>{c=c.concat(r.statementsMatching(r.sym(t),m.owl(`sameAs`),e,n.doc())),l.push(u.st(n,m.vcard(`hasMember`),e,n.doc())),r.statementsMatching(r.sym(t),m.owl(`sameAs`),null,n.doc()).length<2&&(c=c.concat(r.statementsMatching(n,m.vcard(`hasMember`),r.sym(t),n.doc())))}),await Ee(c,l)}function ee(e,t,n){let r=new Set,i=new Set([t.uri]);for(;i.size;){let t=Array.from(i)[0];if(i.delete(t),r.has(t))continue;r.add(t);let a=e.sym(t);e.each(a,m.owl(`sameAs`),null,n).concat(e.each(null,m.owl(`sameAs`),a,n)).forEach(e=>{d(` OWL sameAs found `+e),i.add(e.uri)}),e.each(a,m.schema(`sameAs`),null,n).concat(e.each(null,m.schema(`sameAs`),a,n)).forEach(e=>{d(` Schema sameAs found `+e),i.add(e.uri)})}return r.delete(t.uri),Array.from(r).map(t=>e.sym(t))}function E(e,t){let n=te(e,t).concat(ee(e,t,t.doc())),r=[...new Set(n.map(e=>e.value))].map(t=>e.sym(t));return r.sort(),r.filter(e=>!e.sameTerm(t)),r}function te(e,t,n){return e.each(t,m.vcard(`url`),null,t.doc()).filter(r=>e.holds(r,m.rdf(`type`),n,t.doc())).map(n=>e.any(n,m.vcard(`value`),null,t.doc())).filter(e=>!!e)}function ne(e){let t=e.doc();return _.holds(e,m.rdf(`type`),m.vcard(`Organization`),t)||_.holds(e,m.rdf(`type`),m.schema(`Organization`),t)}function re(e,t,n,r){let i=r.session.paneRegistry.byName(n).render(t,r);return i.classList.add(`namedPane`),i}async function ie(e,t){return oe(e,t,{longPrompt:`Link to a ${b}?`,idNoun:b,urlType:m.vcard(`WebID`)})}async function ae(e,t){let n=_.sym(`http://www.wikidata.org/wiki/Q43229`);for(let t in v)_.holds(e,m.rdf(`type`),m.schema(t),e.doc())&&(n=_.sym(v[t]),d(` renderPublicIdControl bingo: ${t} -> ${n}`));return oe(e,t,{longPrompt:`Add a ${x}?`,idNoun:x,urlType:m.vcard(`PublicId`),dbLookup:!0,class:n,queryParams:y})}async function oe(e,t,n){function r(r,a,o){function s(e){y=!y,v.classList.toggle(`collapsed`,!y),b.children[0].src=y?C:S,b.setAttribute(`aria-expanded`,y?`true`:`false`),b.setAttribute(`aria-label`,y?`Collapse profile`:`Expand profile`)}function c(t){let a=new u.Literal(t.uri);async function s(){try{await T(e,a,n.urlType,o)}catch(t){p(`Error removing Id ${a} from ${e}: ${t}`),d.appendChild(h.errorMessageBlock(r,`Error removing WebId from profile. If it persists, contact admin.`))}await i()}let c=n.urlType.sameTerm(m.vcard(`WebID`)),f={deleteFunction:n.editable?s:null,draggable:!0};c&&(f.title=t.uri.split(`/`)[2],f.image=h.faviconOrDefault(r,t.site()));let g=h.personTR(r,l.ns.foaf(`knows`),t,f);return c&&(g.children[1].textConent=f.title,g.classList.add(`personaRow--webid`)),g.classList.add(`personaRow`),g}let d=r.createElement(`div`);d.classList.add(`fullWidth`);let f=d.appendChild(r.createElement(`table`));f.classList.add(`fullWidth`);let g=f.appendChild(c(a));g.classList.add(`fullWidth`);let _=f.appendChild(r.createElement(`tr`)).appendChild(r.createElement(`td`));_.setAttribute(`colspan`,3);let v,y=!0,b=g.children[2].appendChild(h.button(r,S,`View`,s));return b.classList.add(`personaOpenButton`),b.setAttribute(`aria-expanded`,`true`),b.setAttribute(`aria-label`,`Collapse profile`),ne(e)||ne(a),h.publicData.loadPublicDataThing(o,e,a).then(e=>{try{v=re(r,a,`profile`,t),v.classList.add(`fullWidth`),_.appendChild(v)}catch(e){p(`Error displaying persona `+a+`. Stack: `+e),v=h.errorMessageBlock(r,`Error displaying profile. If it persists, contact admin.`),_.appendChild(v)}},e=>{p(`Error loading persona `+a+`. Stack: `+e),v=h.errorMessageBlock(r,`Error loading profile. If it persists, contact admin.`),_.appendChild(v)}),d}async function i(){let t=E(_,e);g.syncTableToArrayReOrdered(d,t,e=>r(o,e,_))}async function a(e,t){try{await w(e,t,n.urlType,_)}catch(n){p(`Error adding webId `+t+` to `+e+`. Stack: `+n),s.appendChild(h.errorMessageBlock(o,`This is not a valid WebID.`))}await i()}let{dom:o}=t;n||={},n.editable=_.updater.editable(e.doc().uri,_);let s=o.createElement(`div`);if(s.classList.add(`webidControl`,`webidControl--mobile`),E(_,e).length===0&&!n.editable)return s.classList.add(`hidden`),s;let c=s.appendChild(o.createElement(`h3`));if(c.textContent=`Link to a `+n.idNoun,c.classList.add(`contactPanedHeading`),s.appendChild(o.createElement(`table`)).classList.add(`fullWidth`),n.editable){let t={editable:n.editable,manualURIEntry:!0,idNoun:n.idNoun,dbLookup:n.dbLookup},r={queryParams:n.queryParams||y,targetClass:n.class};try{s.appendChild(await h.renderAutocompleteControl(o,e,t,r,a))}catch(e){p(`Render Autocomplete Control failed. Stack:`,e),s.appendChild(h.errorMessageBlock(o,`Error rendering autocomplete. If it persists, contact admin.`))}}let d=s.appendChild(o.createElement(`div`));return await i(),s}var D=c.store,O=l.ns,se;function ce(e){se=e}var k=null,le=null;function ue(){return k&&document.body.contains(k)?k:(k=null,k=se.createElement(`div`),k.id=`contacts-modal`,k.className=`focus-trap hidden`,k.setAttribute(`role`,`presentation`),k.innerHTML=`
2
+ <div class="modal" role="dialog" aria-modal="true" aria-labelledby="modal-title" aria-describedby="modal-desc">
3
+ <h2 id="modal-title"></h2>
4
+ <div id="modal-desc"></div>
5
+ <div id="modal-buttons"></div>
6
+ </div>
7
+ `,document.body.appendChild(k),k.addEventListener(`keydown`,e=>{if(e.key===`Escape`){e.stopPropagation();let t=k.querySelector(`button[data-cancel]`);t?t.click():pe(!1)}else if(e.key===`Tab`){let t=Array.from(k.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`));if(t.length===0)return;let n=t.indexOf(document.activeElement);e.shiftKey?n===0&&(t[t.length-1].focus(),e.preventDefault()):n===t.length-1&&(t[0].focus(),e.preventDefault())}}),k)}function de(e){Array.from(document.body.children).filter(e=>e!==k).forEach(t=>{e?t.setAttribute(`aria-hidden`,`true`):t.removeAttribute(`aria-hidden`)})}function fe({title:e,message:t,buttons:n}){let r=ue();le=document.activeElement,de(!0),r.classList.remove(`hidden`),r.querySelector(`#modal-title`).textContent=e||``;let i=r.querySelector(`#modal-desc`);typeof t==`string`?i.textContent=t:(i.innerHTML=``,i.appendChild(t));let a=r.querySelector(`#modal-buttons`);return a.innerHTML=``,new Promise(e=>{n.forEach(t=>{let n=se.createElement(`button`);n.setAttribute(`type`,`button`),n.textContent=t.label,t.primary&&n.classList.add(`btn-primary`),t.cancel&&n.setAttribute(`data-cancel`,`true`),n.addEventListener(`click`,()=>{pe(t.value),e(t.value)}),a.appendChild(n)});let t=a.querySelector(`button`);t&&t.focus()})}function pe(e){k&&(k.classList.add(`hidden`),de(!1),le&&le.focus&&le.focus())}function A(e,t=`Information`){return fe({title:t,message:e,buttons:[{label:`OK`,value:!0,primary:!0}]})}function me(e,t=`Confirm`){return fe({title:t,message:e,buttons:[{label:`Cancel`,value:!1,cancel:!0},{label:`OK`,value:!0,primary:!0}]})}function he(e){return e&&e.endsWith(`.ttl`)?e+`#this`:e}function j(e,t,n){e.appendChild(l.widgets.errorMessageBlock(t,n,`pink`))}function ge(e,t,n){return e.each(t,O.owl(`sameAs`),null,n).concat(e.each(null,O.owl(`sameAs`),t,n))}function _e(e,t){return new Promise(function(n,r){e.fetcher.load(t).then(function(){let i=e.each(t,O.ldp(`contains`)).map(t=>e.holds(t,O.rdf(`type`),O.ldp(`BasicContainer`))?_e(e,t):(d(`Recursive delete - we delete file `+t.uri),e.fetcher.webOperation(`DELETE`,t.uri)));d(`Recursive delete - we delete folder `+t.uri),i.push(e.fetcher.webOperation(`DELETE`,t.uri)),Promise.all(i).then(e=>{n()}).catch(r)}).catch(r)})}async function ve(e){if(!await me(`Really DELETE `+be(e)+`?`))throw Error(`User cancelled contact deletion`);d(`deleteThingAndDoc - to be deleted `+e);let t=D.statementsMatching(e).concat(D.statementsMatching(void 0,void 0,e));try{await D.updater.updateMany(t),await D.fetcher.delete(e.doc()),d(`deleteThingAndDoc - deleted`)}catch(t){throw p(`Error deleting `+e+`. Stack: `+t),Error(`An error occured while deleting.`)}}function ye(e,t){let n=be(e),r=be(t);if(n&&r){if(n=n.toLowerCase(),r=r.toLowerCase(),n>r)return 1;if(n<r)return-1}return e.uri>t.uri?1:e.uri<t.uri?-1:0}function be(e){let t=D.any(e,O.vcard(`fn`))||D.any(e,O.foaf(`name`))||D.any(e,O.vcard(`organization-name`));return t?t.value:`???`}function xe(e){let t=[`label`,`.formFieldName a`,`.classifierBox-label a`,`.choiceBox-label a`,`.label a`,`a[href="http://www.w3.org/2006/vcard/ns#note"]`,`a[href$="#note"]`].join(`, `),n=e?.querySelectorAll?.(t);n&&Array.from(n).forEach(e=>{typeof e.tabIndex==`number`&&e.tabIndex!==-1&&(e.tabIndex=-1),e.getAttribute(`aria-hidden`)!==`true`&&e.setAttribute(`aria-hidden`,`true`)})}function Se(e){return!!D.findTypeURIs(e.doc())[O.foaf(`PersonalProfileDocument`).uri]}function Ce(e,t=900){function n(){let n=e.getBoundingClientRect().width,r=n>0?n<=t:!1,i=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(max-width: `+t+`px)`).matches:!1,a=n>0?r:i;return n>0?(e.dataset.paneWidth=Math.round(n).toString(),e.dataset.paneNarrow=r?`true`:`false`):(e.dataset.paneWidth=`0`,e.dataset.paneNarrow=i?`true`:`false`),e.classList.toggle(`contactPane--narrow`,a),e.dataset.viewportNarrow=i?`true`:`false`,a}function r(e,t){let n=null;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}let i=r(()=>{n()},100);typeof ResizeObserver<`u`&&new ResizeObserver(()=>{i()}).observe(e),typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`resize`,i);function a(){n(),e.isConnected||requestAnimationFrame(a)}a()}var M=l.ns,we=l.utils,N=c.store,Te=N.updater;async function Ee(e,t=[]){let n=e.concat(t).map(e=>e.why),r=[];n.forEach(e=>{r.find(t=>t.equals(e))||r.push(e)});let i=r.map(n=>N.updater.update(e.filter(e=>e.why.sameTerm(n)),t.filter(e=>e.why.sameTerm(n))));return Promise.all(i)}async function De(e,t,n,r){await N.fetcher.load(e.doc());let i=N.any(e,M.vcard(`nameEmailIndex`)),a=we.genUuid(),o=N.sym(e.dir().uri+`Person/`+a+`/index.ttl#this`),s=o.doc(),c=[u.st(o,M.vcard(`inAddressBook`),e,i),u.st(o,M.vcard(`fn`),t,i),u.st(o,M.vcard(`fn`),t,s),u.st(o,M.rdf(`type`),r,s),u.st(s,M.dct(`created`),new Date,s)],l=Array.isArray(n)?n:Object.keys(n||{});if(l.length>0)for(let e of l){let n=N.sym(e),r=n.doc();c.push(u.st(n,M.vcard(`hasMember`),o,r),u.st(o,M.vcard(`fn`),t,r))}else{A(`Must be a member of at least one group. Please select or create a group.`);return}try{await Te.updateMany([],c)}catch(e){throw p(`Cannot add group membership for `+o+`. Stack:`+e),Error(`Save new contact`)}return o}function Oe(e){return e.replace(/\W/gu,`_`).replace(/_+/g,`_`)}async function ke(e,t){await N.fetcher.load(e.doc());let n=N.any(e,M.vcard(`groupIndex`)),r=Oe(t),i=N.sym(e.dir().uri+`Group/`+r+`.ttl#this`),a=i.doc();try{await N.fetcher.load(n)}catch(e){throw Error(`Error loading group index!`+n.uri+`: `+e)}if(N.holds(e,M.vcard(`includesGroup`),i,n))return i;let o=[u.st(e,M.vcard(`includesGroup`),i,n),u.st(i,M.rdf(`type`),M.vcard(`Group`),n),u.st(i,M.vcard(`fn`),t,n)];try{await Te.update([],o)}catch(e){throw Error(`Could not update group index `+e)}let s=[u.st(e,M.vcard(`includesGroup`),i,a),u.st(i,M.rdf(`type`),M.vcard(`Group`),a),u.st(i,M.vcard(`fn`),t,a)];try{await Te.update([],s)}catch(e){throw Error(`Could not update group file: `+e)}return i}async function Ae(e,t){let n=[e.doc(),t.doc()];try{await N.fetcher.load(n)}catch(n){throw p(`Error adding `+e+` to group `+t+`. Stack: `+n),Error(`Error adding to group.`)}let r=N.findTypeURIs(e);if(!(M.vcard(`Individual`).uri in r||M.vcard(`Organization`).uri in r)){f(`Thing `+e+` is not an Individual or Organization, but has types: `+Object.keys(r)),A(`You are trying to add something else than an individual or organization.`);return}let i=N.any(e,M.vcard(`fn`)),a=N.any(t,M.vcard(`fn`));if(!i){f(`Thing `+e+` has no vcard:fn`),A(`What you are trying to add seems to have no full name.`);return}if(N.holds(e,M.vcard(`fn`),null,t.doc())){i===``&&(i=`Contact`),A(i+` already exists in group `+a+`.`);return}if(!await me(`Add `+i+` to group `+a+`?`))return;let o=[u.st(e,M.vcard(`fn`),i,t.doc())],s=E(N,e).map(e=>e.value);s.length?s.forEach(n=>{o.push(u.st(N.sym(n),M.owl(`sameAs`),e,t.doc())),o.push(u.st(t,M.vcard(`hasMember`),N.sym(n),t.doc()))}):o.push(u.st(t,M.vcard(`hasMember`),e,t.doc()));try{await Te.update([],o),N.fetcher.unload(t.doc()),await N.fetcher.load(t.doc())}catch(n){throw p(`Error adding `+e+` to group `+t+`. Stack: `+n),Error(`Error adding to group.`)}return e}function je(e,t){let n=e.each(t,M.vcard(`hasMember`),null,t.doc()),r=[];return n.forEach(n=>{r=e.any(n,M.vcard(`fn`),null,t.doc())?r.concat(n):r.concat(e.each(n,M.owl(`sameAs`),null,t.doc()))}),r=[...new Set(r.map(e=>e.uri))].map(t=>e.sym(t)),r}function Me(e,t){let n=e.dir().dir().dir();return t.uri&&t.uri.startsWith(n.uri)}async function Ne(e){let t=[],n=[];return e.forEach(e=>{N.each(e,M.vcard(`hasMember`),null,e.doc()).forEach(r=>{let i=ge(N,r,e.doc());if(i.length&&Me(e,r)){for(let a of i)if(!Me(e,a)){t.push(u.st(e,M.vcard(`hasMember`),r,e.doc())),n.push(u.st(e,M.vcard(`hasMember`),a,e.doc()));break}}})}),{del:t,ins:n}}var{setACLUserPublic:Pe}=c.solidLogicSingleton.acl;function Fe(e,t){return new Promise(function(n,r){l.login.ensureLoadedProfile(t).then(t=>{d(`Logged in as `+t.me);let i=t.me,a=t.dom,o=t.div,s=e.session.store,c=l.ns,f=t.newBase||t.newInstance.dir().uri;if((t.instanceClass||c.vcard(`AddressBook`)).sameTerm(c.vcard(`Group`))){let e=t.newInstance||s.sym(t.newBase+`index.ttl#this`),i=e.doc();s.add(e,c.rdf(`type`),c.vcard(`Group`),i),s.add(e,c.vcard(`fn`),t.instanceName||`untitled group`,i),s.fetcher.putBack(i,{contentType:`text/turtle`}).then(function(e){n(t)}).catch(function(e){p(`Failed to fetch new address book. Stack: `+e),r(Error(`Error creating document for new group `+e))});return}let m=`@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.
8
+ @prefix ab: <http://www.w3.org/ns/pim/ab#>.
9
+ @prefix dc: <http://purl.org/dc/elements/1.1/>.
10
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
11
+
12
+ <#this> a vcard:AddressBook;
13
+ dc:title "New address Book";
14
+ vcard:nameEmailIndex <people.ttl>;
15
+ vcard:groupIndex <groups.ttl>.
16
+ `;m+=`<#this> <http://www.w3.org/ns/auth/acl#owner> <`+i.uri+`>.
17
+
18
+ `;let h=s.sym(f+`index.ttl#this`),g=[{to:`index.ttl`,content:m,contentType:`text/turtle`},{to:`groups.ttl`,content:``,contentType:`text/turtle`},{to:`people.ttl`,content:``,contentType:`text/turtle`},{to:``,existing:!0,aclOptions:{defaultForNew:!0}}];function _(e,r){d(`New ${r} created at ${e}`);let i=o.appendChild(a.createElement(`p`));i.classList.add(`claimSuccess`),i.innerHTML=`Your <a href='`+e.uri+`'><b>new `+r+`</b></a> is ready. <br/><br/><a href='`+e.uri+`'>Go to new `+r+`</a>`,n(Object.assign({newInstance:e},t))}function v(){function e(e,o){if(!o)return r(Error(`Error writing new file `+t.to));Pe(n,i,a).then(()=>v()).catch(e=>{p(`Error setting access permissions for `+t.to+`. Stack: `+e);let n=`Error setting access permissions for `+t.to+`.`;return r(Error(n))})}if(g.length===0)_(h,`address book`);else{var t=g.shift();d(`Creating new file `+t.to+` in new instance `);var n=u.uri.join(t.to,f),a=t.aclOptions||{};`content`in t?s.fetcher.webOperation(`PUT`,n,{data:t.content,saveMetadata:!0,contentType:t.contentType}).then(()=>e(n,!0)):`existing`in t?e(n,!0):r(Error(`Copy not expected while buiding new app.`))}}v()},e=>{f(`Error logging in. Stack: `+e),j(t.div,t.dom,`Please log in to create a new address book.`)})})}var Ie={"image/png":`png`,"image/jpeg":`jpg`,"image/gif":`gif`,"image/svg+xml":`svg`,"image/webp":`webp`,"image/bmp":`bmp`,"image/tiff":`tiff`,"application/pdf":`pdf`,"text/plain":`txt`,"text/html":`html`,"application/json":`json`,"application/octet-stream":`bin`},Le=Object.fromEntries(Object.entries(Ie).map(([e,t])=>[t,e])),Re={extension:e=>Ie[e]||!1,lookup:e=>Le[e.split(`.`).pop().toLowerCase()]||!1},P=l.ns,ze=l.utils,F=c.store;function Be(e,t){function n(t){x.appendChild(l.widgets.errorMessageBlock(e,t,`pink`))}async function r(e,t,n){let r=[u.st(e,P.vcard(`hasPhoto`),t,e.doc())];try{n?await F.updater.update(r,[]):await F.updater.update([],r)}catch(e){throw p(`Writing back image link FAILED `+t+`. Stack: `+e),Error(`Writing back image link FAILED`)}}function i(e){F.fetcher.nowOrWhenFetched(e.doc(),function(n,r){if(!n)p(`Error looking up dropped thing `+e+`. Stack: `+r);else{let n=F.findTypeURIs(e);for(let e in n)d(`drop object type includes: `+e);d(`Default: assume web page `+e),F.add(t,P.wf(`attachment`),e,t.doc())}})}function a(e,r,i){let a=Re.extension(r);r!==Re.lookup(e)&&(e+=`_.`+a,f(`MIME TYPE MISMATCH -- adding extension: `+e));let o,s,c=r.startsWith(`image`);c?(o=`image_`,s=P.vcard(`hasPhoto`)):(o=`attachment_`,s=P.wf(`attachment`));let l,u;for(l=0;u=F.sym(t.dir().uri+e),F.holds(t,P.vcard(`hasPhoto`),u);l++)e=o+l+`.`+a;d(`Putting `+i.byteLength+` bytes of `+r+` to `+u),F.fetcher.webOperation(`PUT`,u.uri,{data:i,contentType:r}).then(function(e){if(!e.ok){p(`Upload of `+u+` failed: `+e.status+` `+e.statusText),n(`Error uploading picture. If the problem persists, contact admin.`);return}d(`Upload picture put OK: `+u),F.add(t,s,u,t.doc()),F.fetcher.putBack(t.doc(),{contentType:`text/turtle`}).then(function(e){c&&S.refresh()},function(e){p(` Write back image link FAIL `+u+`. Stack: `+e)})})}async function o(e){for(let t of e){let e=u.sym(t);if(d(`Dropped on mugshot thing `+e),t.startsWith(`http`)&&t.indexOf(`#`)<0){t.startsWith(`http:`)&&(e=u.sym(`https:`+t.slice(5)));let n={withCredentials:!1,credentials:`omit`},r;try{r=await F.fetcher.webOperation(`GET`,e.uri,n)}catch(t){p(`Fetch error trying to GET picture `+e+`. Stack: `+t),i(e);return}let o=r.headers.get(`Content-Type`),s=e.uri.split(`/`).slice(-1)[0];s=s.split(`?`)[0];let c=await r.arrayBuffer();if(!r.ok){p(`Cant download, so will link image. `+e+`:`+r.status),i(e);return}a(s,o,c);return}else n(`Not a web document URI, cannot copy `+e+` as picture.`);i(e)}}function s(e){for(let t=0;t<e.length;t++){let n=e[t];d(` contacts: Filename: `+n.name+`, type: `+(n.type||`n/a`)+` size: `+n.size+` bytes, last modified: `+(n.lastModifiedDate?n.lastModifiedDate.toLocaleDateString():`n/a`));let r=new FileReader;r.onload=(function(e){return function(t){let n=t.target.result;d(` File read byteLength : `+n.byteLength);let r=encodeURIComponent(e.name),i=e.type;a(r,i,n)}})(n),r.readAsArrayBuffer(n)}}function m(t){let n=e.createElement(`img`);return n.classList.add(`mugshotImage`),n.setAttribute(`alt`,t?`Contact photo`:`Drop photo here`),l.widgets.makeDropTarget(n,o,s),t&&(c.store.fetcher._fetch(t.uri).then(function(e){return e.blob()}).then(function(e){let t=URL.createObjectURL(e);n.setAttribute(`src`,t)}),l.widgets.makeDraggable(n,t)),n}function h(){let e=F.each(t,P.vcard(`hasPhoto`));e.sort(),e=e.slice(0,5),e.length===0?(S.innerHTML=``,b&&S.appendChild(C)):ze.syncTableToArray(S,e,m)}function g(){return F.sym(t.dir().uri+`Image_`+Date.now()+`.png`)}async function _(e){e&&(await r(t,e),h())}function v(){let i=l.widgets.button(e,l.icons.iconBase+`noun_925021.svg`,`Drag here to delete`,void 0,{"aria-label":`Delete picture - drag picture here`});async function a(e){let i=F.each(t,P.vcard(`hasPhoto`)).map(e=>e.uri);for(let a of e){if(!i.includes(a)){A(`Only drop pictures onto this trash can.`);return}if(await me(`Really DELETE picture?`))try{d(`Unlinking image file `+a),await r(t,F.sym(a),!0),d(`Deleting image file `+a),await F.fetcher.webOperation(`DELETE`,a)}catch{n(`Error deleting picture. If it persists, contact your admin.`);return}}h()}return l.widgets.makeDropTarget(i,a,null),i}function y(){let t=e.createElement(`table`),n=t.appendChild(e.createElement(`tr`)),r=n.appendChild(e.createElement(`td`)),i=n.appendChild(e.createElement(`td`)),a=n.appendChild(e.createElement(`td`));r.appendChild(l.media.cameraButton(e,F,g,_));try{i.appendChild(l.widgets.fileUploadButtonDiv(e,s))}catch(e){d(`ignore fileUploadButtonDiv error for now`,e)}return a.appendChild(v()),t}let b=F.updater.editable(t.doc().uri,F),x=e.createElement(`div`),S=x.appendChild(e.createElement(`div`)),C=m();return l.widgets.setImage(C,t),h(),S.refresh=h,b&&x.appendChild(y()),x}var I=l.ns,Ve=l.utils,L=c.store,R,z={},He={},B=null,V=null,Ue=null,We=null,H=null,Ge=null,Ke=null;function U(e,t){e.querySelectorAll(`button`).forEach(e=>{e.classList.remove(`btn-primary`,`allGroupsButton--selected`,`allGroupsButton--active`,`allGroupsButton--loaded`),e.classList.add(`btn-secondary`)}),t&&(t.classList.remove(`btn-secondary`),t.classList.add(`btn-primary`))}function qe(e,t,n,r,i,a,o,s,c,l){R=r,z=i||{},a&&(B=a),o&&(Ue=o),s&&(We=s),c&&(Ge=c),l&&(Ke=l),H=e,V=t;let u=$e(H,n);Ve.syncTableToArrayReOrdered(V,u,Xe)}function Je(e){let t=L.any(e,I.vcard(`fn`)),n=R.createElement(`li`);n.setAttribute(`role`,`listitem`),n.setAttribute(`aria-label`,t?t.value:`Some group`),n.subject=e,l.widgets.makeDraggable(n,e);let r=n.appendChild(R.createElement(`button`));return r.setAttribute(`type`,`button`),r.innerHTML=t?t.value:`Some group`,r.classList.add(`allGroupsButton`,`actionButton`,`btn-secondary`,`action-button-focus`),{groupLi:n,groupButton:r,name:t}}async function Ye(e,t){for(let n of e){let e=L.sym(n);try{e=await Ae(e,t)}catch{A(`Error adding to group. Make sure you are adding a contact URI.`)}e&&G(B)}}function Xe(e){function t(t){if(t.preventDefault(),U(V,r),Ke&&Ke(),!t.metaKey)for(let e in z)delete z[e];z[e.uri]=!z[e.uri],W(V,z),L.fetcher.nowOrWhenFetched(e.doc(),void 0,function(t,n){t||p(`Cannot load one group: `+e+`. Stack: `+n),G(B,null,!1)})}let{groupLi:n,groupButton:r}=Je(e);return r.addEventListener(`click`,t,!1),l.widgets.makeDropTarget(n,t=>Ye(t,e)),n.addEventListener(`click`,t,!0),n}function Ze(e,t,n){function r(r,i){return new Promise((a,o)=>{i.classList.add(`group-loading`),i.setAttribute(`aria-busy`,`true`),L.fetcher.nowOrWhenFetched(r.doc(),void 0,function(s,c){if(!s){let e=`Cannot load group `+r+`. Stack: `+c;p(e),n&&n(!1,e),o(e);return}i.classList.remove(`group-loading`),i.setAttribute(`aria-busy`,`false`),i.classList.add(`selected`),e[r.uri]=!0,W(t,e),G(B,null),n&&n(!0),a(!0)})})}for(let e=0;e<t.children.length;e++){let i=t.children[e],a=i.subject;a&&r(a,i).catch(e=>{n&&n(!1,e)})}}function W(e,t){for(let n=0;n<e.children.length;n++){let r=e.children[n];r.subject&&r.classList.toggle(`selected`,!!t[r.subject.uri])}}function Qe(e,t,n,r,i,a,o){R=r,i&&(z=i),a&&(B=a),o&&(Ue=o),V=n;let s=$e(e,t);s.length>0&&Xe(s[0]),Ve.syncTableToArrayReOrdered(n,s,Xe)}function $e(e,t){let n=[];if(t.foreignGroup&&n.push([``,L.any(t.foreignGroup,I.vcard(`fn`)),t.foreignGroup]),e){let t=L.any(e,I.vcard(`groupIndex`)),r=(e?L.each(e,I.vcard(`includesGroup`),null,t):[]).map(function(t){return[e,L.any(t,I.vcard(`fn`)),t]});n=n.concat(r),n.sort()}return n.map(e=>e[2])}async function et(e){let t=L.any(e,I.vcard(`groupIndex`));if(t){await L.fetcher.load(t);let n=e?L.each(e,I.vcard(`includesGroup`),null,t):[];return await L.fetcher.load(n),n}else return[]}function tt(e){if(e)return e;let t;for(let e in z){t=L.sym(e);let n=L.any(void 0,I.vcard(`includesGroup`),t);if(n)return n}throw Error(`findBookFromGroups: Cant find address book which this group is part of`)}function G(e,t,n=!0){let r=e||B;if(!r||!r.children||typeof r.children.length!=`number`){f(`refreshNames called with invalid ulPeople:`,r);return}function i(e,t){function n(e){e.preventDefault(),nt(r,t,We)}e.addEventListener(`click`,n),e.addEventListener(`keydown`,function(e){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n(e))})}let a=[];Object.keys(z).map(e=>L.sym(e)).forEach(e=>{z[e.value]&&(a=a.concat(je(L,e)))}),a.sort(ye);for(let e=0;e<a.length-1;)a[e].uri===a[e+1].uri?a.splice(e,1):e++;function o(e,t){let n=R.createElement(`li`);n.setAttribute(`role`,`listitem`),n.setAttribute(`tabindex`,`0`),n.classList.add(`personLi`),n.subject=e,l.widgets.makeDraggable(n,e);let r=R.createElement(`div`);r.classList.add(`personLi-row`);let a=R.createElement(`div`);a.classList.add(`personLi-avatar`);let o=R.createElement(`div`);o.classList.add(`avatar-placeholder`),o.innerHTML=`<svg aria-hidden="true" width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="18" cy="18" r="18" fill="#e0e0e0"/><text x="50%" y="58%" text-anchor="middle" fill="#595959" font-size="16" font-family="Arial" dy=".3em">?</text></svg>`,a.appendChild(o);let s=be(e)||`Unknown Name`;function c(){let t=L.any(e,I.vcard(`hasPhoto`));if(t&&t.value){let e=R.createElement(`img`);e.src=t.value,e.alt=s+` avatar`,a.replaceChild(e,a.firstChild)}}c(),L.fetcher.nowOrWhenFetched(e.doc(),void 0,function(t,r){if(!t){p(`Cannot load contact: `+e+`. Stack: `+r),n.classList.add(`personLi--error`);return}c()});let u=R.createElement(`div`);u.classList.add(`personLi-info`),n.setAttribute(`aria-label`,s);let d=R.createElement(`div`);d.classList.add(`personLi-name`),d.textContent=s,u.appendChild(d);let f=R.createElement(`div`);return f.classList.add(`personLi-arrow`),f.innerHTML=`<svg aria-hidden="true" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 4.5L11.25 9L6 13.5" stroke="#595959" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`,r.appendChild(a),r.appendChild(u),r.appendChild(f),n.appendChild(r),i(n,e),n}Ve.syncTableToArrayReOrdered(r,a,e=>o(e,r)),it(r,n,t||We)}function nt(e,t,n){if(!n)return;n.parentNode&&n.parentNode.classList.remove(`hidden`),n.innerHTML=`Loading...`,n.setAttribute(`aria-busy`,`true`),n.classList.add(`detailsSectionContent--wide`),He={},He[t.uri]=!0,it(e,!1,n);let r;try{r=H?st(t):t}catch(e){n.innerHTML=``,n.setAttribute(`aria-busy`,`false`),j(n,R,`Cannot load contact: `+e.message);return}L.fetcher.nowOrWhenFetched(r.doc(),void 0,function(i,a){if(n.innerHTML=``,n.setAttribute(`aria-busy`,`false`),!i){p(`Failed to load contact card: `+r+`. Stack: `+a),j(n,R,`Failed to load contact. If it persists, contact your admin.`);return}let o=R.createElement(`div`);o.classList.add(`contact-toolbar`);let s=l.widgets.linkIcon(R,r);s.setAttribute(`title`,`Uri of contact`),o.appendChild(s),c.authn.currentUser()&&l.widgets.deleteButtonWithCheck(R,o,`contact`,async function(){let r=t.dir();d(`We are about to delete the contact `+L.any(t,I.vcard(`fn`))),await et();let i=L.any(H,I.vcard(`nameEmailIndex`));await L.fetcher.load(i);let a=dt(t),s=[];a.forEach(e=>{ge(L,t,e.doc()).forEach(t=>{ge(L,t,e.doc()).length===1&&(s=s.concat(L.statementsMatching(e,I.vcard(`hasMember`),t,e.doc())))})}),await L.updater.updateMany(s);try{await ve(t)}catch{j(n,R,`Failed to delete contact. If it persists, contact your admin.`);return}try{await _e(L,r,o,R)}catch{j(n,R,`Failed to delete contact. If it persists, contact your admin.`);return}G(e,n),n.innerHTML=`Contact data deleted.`}).classList.add(`deleteButton`),n.appendChild(o),n.classList.add(`detailsSectionContent--wide`),n.appendChild(ot(r,`contact`))})}function rt(e){if(He={},e)for(let t=0;t<e.children.length;t++)e.children[t].classList.remove(`selected`)}function it(e,t,n){let r=0,i=null;for(let t=0;t<e.children.length;t++){let n=e.children[t],a=at(be(n.subject));a&&(r++,i=n),n.classList.toggle(`selected`,a&&!!He[n.subject.uri]),n.classList.toggle(`hidden`,!a)}if(r===1&&t){let t=i.subject;nt(e,t,n)}}function at(e){let t=Ue.value.trim().toLowerCase();if(t.length===0)return!0;let n=t.split(` `);for(let t=0;t<n.length;t++){let r=n[t];if(e.toLowerCase().indexOf(r)<0)return!1}return!0}function ot(e,t){let n=Ge.session.paneRegistry.byName(t).render(e,Ge);return n.classList.add(`renderPane`),n}function st(e){let t=L.allAliases(e),n=H.dir().uri;for(let e=0;e<t.length;e++)if(t[e].uri.slice(0,n.length)===n)return t[e];throw Error(`No local URI for `+e)}async function ct(e,t){let n=await et(e);if(n&&n.length>0){let{del:e,ins:r}=await Ne(n);c.authn.currentUser()&&e.length&&l.widgets.deleteButtonWithCheck(R,t,`contact`,async function(){await L.updater.updateMany(e,r),d(`Deleted `+e.length+` bad statements from groups`)})}}async function lt(){let e=tt(H);try{await L.fetcher.load(e)}catch{throw Error(`Book won't load:`+e)}let t=L.any(e,I.vcard(`nameEmailIndex`));if(!t)throw Error(`No nameEmailIndex`);await L.fetcher.load(t)}var K=l.ns,ut=c.store;function dt(e,t=ut){let n=t.statementsMatching(null,K.owl(`sameAs`),e).map(e=>e.why).concat(t.each(null,K.vcard(`hasMember`),e));return n=[...new Set(n.map(e=>he(e.uri)))].map(e=>t.sym(e)),n}async function ft(e,t,n){let r=n||null;async function i(e,t){let n=f.any(e,K.vcard(`fn`)),i=f.any(t,K.vcard(`fn`)),a=f.each(null,K.owl(`sameAs`),e,t.doc()),s=[];a.forEach(n=>{f.statementsMatching(n,K.owl(`sameAs`),e,t.doc())&&(s=s.concat(n))}),s=te(f,e).map(e=>e.value);let c=s.map(e=>f.sym(e)),m=[e].concat(c).flatMap(e=>f.each(null,K.vcard(`hasMember`),e));if(m=[...new Set(m.map(e=>e.uri))].map(e=>f.sym(e)),m.length<2){A(`Must be a member of at least one group. Add to another group first.`);return}if(await me(`Remove `+n+` from group `+i+`?`)){let a=f.statementsMatching(e,void 0,void 0,t.doc()).concat(f.statementsMatching(void 0,void 0,e,t.doc()));s.forEach(e=>{f.statementsMatching(e,K.owl(`sameAs`),void 0,t.doc()).length<2&&(a=a.concat(f.statementsMatching(void 0,void 0,e,t.doc())))});try{await f.updater.update(a,[])}catch(e){let n=`Error removing member from group `+t+`: `+e;p.appendChild(l.widgets.errorMessageBlock(u,n,`pink`));return}d(`Removed `+n+` from group `+i),f.fetcher.unload(t.doc()),await f.fetcher.load(t.doc()),o(),G(r)}}function a(t){let n=f.any(t,K.vcard(`fn`)),r=n?n.value:t.uri,a=u.createElement(`li`);a.classList.add(`group-membership-item`);let o=u.createElement(`button`);o.setAttribute(`type`,`button`),o.classList.add(`allGroupsButton`,`actionButton`,`btn-secondary`,`action-button-focus`),o.textContent=r,o.title=r,a.appendChild(o);let s=u.createElement(`div`);s.classList.add(`group-membership-toolbar`);let d=l.widgets.linkIcon(u,t);return d.setAttribute(`title`,`Link to `+r),s.appendChild(d),c.authn.currentUser()&&l.widgets.deleteButtonWithCheck(u,s,`membership in `+r,async function(){await i(e,t)}),a.appendChild(s),a}function o(t=null){p.innerHTML=``;let n=u.createElement(`h3`);n.classList.add(`group-membership-header`),n.textContent=`Part of groups`,p.appendChild(n);let r=u.createElement(`ul`);r.classList.add(`group-pills-wrapper`),p.appendChild(r),t||=dt(e,f),t.length===0?r.innerHTML=`<span>Not part of any Address Book group.</span>`:r.innerHTML=``,t.forEach(e=>{r.appendChild(a(e))})}async function s(e=null){if(!e&&(e=f.any(void 0,K.vcard(`includesGroup`)),!e))return[];let t=f.any(e,K.vcard(`groupIndex`)),n=e?f.each(e,K.vcard(`includesGroup`),null,t):[];return await f.fetcher.load(n),n}let{dom:u}=t,f=t.session.store,p=u.createElement(`div`);return p.classList.add(`group-membership-container`),await s(),p.refresh=o,o(),p}var pt=`# This turtle file defines the forms used in the contacts management
19
+ #
20
+ # Individuals and orgs are in one file as they both
21
+ # share some forms (address etc) and also interactions (roles)
22
+
23
+ # Forms documentation: https://solidos.github.io/solid-ui/docs/forms-intro.html
24
+
25
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
26
+ @prefix dct: <http://purl.org/dc/terms/>.
27
+ @prefix foaf: <http://xmlns.com/foaf/0.1/>.
28
+ @prefix owl: <http://www.w3.org/2002/07/owl#>.
29
+ @prefix prov: <http://www.w3.org/ns/prov#>.
30
+ @prefix ui: <http://www.w3.org/ns/ui#>.
31
+ @prefix schema: <http://schema.org/>.
32
+ @prefix solid: <http://www.w3.org/ns/solid/terms#>.
33
+ @prefix vcard: <http://www.w3.org/2006/vcard/ns#>.
34
+ @prefix : <#>.
35
+
36
+
37
+ ############# For individual:
38
+ :individualForm a ui:Form ;
39
+ dct:title "Contact details for a person" ;
40
+ ui:parts (
41
+ :fullNameField
42
+ :nicknameGroup
43
+ :pronounsGroup
44
+ :roleField
45
+ :orgNameField
46
+ # :addressesComment
47
+ :addresses
48
+ # :emailComment
49
+ :eMails
50
+ # :telephoneComment
51
+ :telephones
52
+ :birthdayField
53
+ # :noteComment
54
+ :noteField
55
+ ) .
56
+
57
+ :fullNameField
58
+ a ui:SingleLineTextField ;
59
+ ui:label "Name";
60
+ ui:maxLength "128" ;
61
+ ui:property vcard:fn .
62
+
63
+ # Nickname
64
+
65
+ :nicknameGroup a ui:Group; ui:weight 0;
66
+ ui:parts (:nicknameField) .
67
+
68
+ :nicknameField a ui:SingleLineTextField;
69
+ ui:property foaf:nick;
70
+ ui:label "Nickname"@en, "Nom court"@fr.
71
+
72
+ # Pronouns
73
+
74
+ :pronounsGroup a ui:Group; ui:weight 0;
75
+ ui:parts ( :subjectPronounForm :objectPronounForm :relativePronounForm) .
76
+
77
+ :subjectPronounForm a ui:SingleLineTextField; ui:property solid:preferredSubjectPronoun;
78
+ ui:label "he/she/they" .
79
+ :objectPronounForm a ui:SingleLineTextField; ui:property solid:preferredObjectPronoun;
80
+ ui:label "him/her/them" .
81
+ :relativePronounForm a ui:SingleLineTextField; ui:property solid:preferredRelativePronoun;
82
+ ui:label "his/hers/theirs" .
83
+
84
+ :roleField
85
+ a ui:SingleLineTextField ;
86
+ ui:suppressEmptyUneditable true;
87
+ ui:maxLength "128" ;
88
+ ui:property vcard:role .
89
+
90
+ :orgNameField
91
+ a ui:SingleLineTextField ;
92
+ ui:suppressEmptyUneditable true;
93
+ ui:maxLength "128" ;
94
+ ui:property vcard:organization-name .
95
+
96
+ :addresses a ui:Multiple ;
97
+ dct:title "Address details" ;
98
+ ui:part :oneAddress ;
99
+ ui:property vcard:hasAddress .
100
+
101
+ :oneAddress a ui:Group ;
102
+ ui:parts (
103
+ :id1409437207443 :id1409437292400
104
+ :id1409437421996 :id1409437467649
105
+ :id1409437569420 ).
106
+
107
+ :id1409437207443
108
+ a ui:SingleLineTextField ;
109
+ ui:maxLength "128" ;
110
+ ui:property vcard:street-address .
111
+
112
+ :id1409437292400
113
+ a ui:SingleLineTextField ;
114
+ ui:maxLength "128" ;
115
+ ui:property vcard:locality .
116
+
117
+ :id1409437421996
118
+ a ui:SingleLineTextField ;
119
+ ui:maxLength "25" ;
120
+ ui:property vcard:postal-code .
121
+
122
+ :id1409437467649
123
+ a ui:SingleLineTextField ;
124
+ ui:maxLength "128" ;
125
+ ui:property vcard:region .
126
+
127
+ :id1409437569420
128
+ a ui:SingleLineTextField ;
129
+ ui:maxLength "128" ;
130
+ ui:property vcard:country-name .
131
+
132
+
133
+ :eMails a ui:Multiple ;
134
+ ui:part :oneEMail ;
135
+ ui:property vcard:hasEmail .
136
+
137
+ :oneEMail a ui:Group ; # hint: side by side is good
138
+ ui:part :emailValue, :emailType ;
139
+ ui:parts ( :emailType :emailValue ).
140
+
141
+ :emailValue
142
+ a ui:EmailField ; ui:label "email";
143
+ ui:property vcard:value .
144
+
145
+ :emailType
146
+ a ui:Classifier ;
147
+ ui:canMintNew "0" ;
148
+ ui:category vcard:Type ;
149
+ ui:from vcard:Type ;
150
+ ui:property rdf:type .
151
+
152
+ :telephones a ui:Multiple ;
153
+ ui:part :onetelephone ;
154
+ ui:property vcard:hasTelephone .
155
+
156
+ :onetelephone
157
+ a ui:Group ;
158
+ ui:part :telephoneValue, :telephoneType ;
159
+ ui:parts ( :telephoneType :telephoneValue ).
160
+
161
+ :telephoneValue
162
+ a ui:PhoneField ;
163
+ ui:property vcard:value .
164
+
165
+ :telephoneType
166
+ a ui:Classifier ;
167
+ ui:canMintNew "0" ;
168
+ ui:category vcard:TelephoneType ;
169
+ ui:from vcard:Type ;
170
+ ui:property rdf:type .
171
+
172
+ :birthdayField a ui:DateField;
173
+ ui:label "Born"@en;
174
+ ui:suppressEmptyUneditable true;
175
+ ui:property vcard:bday .
176
+
177
+ :noteField
178
+ a ui:MultiLineTextField ;
179
+ ui:suppressEmptyUneditable true;
180
+ ui:property vcard:note .
181
+
182
+ # Ontology additions or interpretations needed for the form to work well
183
+
184
+ # The ontology file doesn't make them disjoint. This makes the selector be a choice.
185
+ vcard:TelephoneType owl:disjointUnionOf ( vcard:Cell vcard:Home vcard:Work) .
186
+ vcard:Type owl:disjointUnionOf (vcard:Home vcard:Work) . # for email
187
+
188
+ # Better field labels
189
+ vcard:Cell ui:label "mobile"@en . # app will make initial caps if necessary
190
+ vcard:hasAddress ui:label "address"@en .
191
+ vcard:bday ui:label "born"@en.
192
+ vcard:hasEmail ui:label "email"@en .
193
+ vcard:hasTelephone ui:label "phone"@en .
194
+ vcard:note ui:label "notes"@en .
195
+
196
+
197
+ ############ For organizations
198
+
199
+ :organizationForm a ui:Form ;
200
+ dct:title "Contact details for an organization";
201
+ ui:parts (
202
+ :OrgClassifier
203
+ :fullNameField
204
+ :homePageURIField
205
+ :addresses
206
+ :eMails
207
+ :telephones
208
+ :noteField ) .
209
+
210
+ :OrgClassifier a ui:Classifier;
211
+ ui:label "What sort of organization?"@en;
212
+ ui:category solid:InterestingOrganization .
213
+
214
+ :homePageURIField a ui:NamedNodeURIField;
215
+ ui:label "Homepage"@en;
216
+ ui:property schema:url .
217
+
218
+ # Ontology data to drive the :OrgClassifier classifier
219
+ solid:InterestingOrganization owl:disjointUnionOf (
220
+ # Airline - a Corporation
221
+ # Consortium - a Corporation or a NGO
222
+ schema:Corporation
223
+ schema:EducationalOrganization
224
+ schema:ResearchOrganization # Proposed. https://github.com/schemaorg/schemaorg/issues/2877
225
+ # FundingScheme - eh?
226
+ schema:GovernmentOrganization
227
+ # LibrarySystem
228
+ # LocalBusiness - Corporation
229
+ # MedicalOrganization - a Corporation or a NGO
230
+ schema:NGO
231
+ # NewsMediaOrganization - a Corporation or a NGO
232
+ schema:PerformingGroup # a band
233
+ schema:Project # like Solid
234
+ schema:SportsOrganization) .
235
+ `,mt=`@prefix : <http://www.w3.org/2006/vcard/ns#> .
236
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
237
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
238
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
239
+ @prefix xml: <http://www.w3.org/XML/1998/namespace> .
240
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
241
+
242
+ :Acquaintance a owl:Class ;
243
+ rdfs:label "Acquaintance"@en ;
244
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
245
+ rdfs:subClassOf :RelatedType .
246
+
247
+ :Agent a owl:Class ;
248
+ rdfs:label "Agent"@en ;
249
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
250
+ rdfs:subClassOf :RelatedType .
251
+
252
+ :BBS a owl:Class ;
253
+ rdfs:label "BBS"@en ;
254
+ rdfs:comment "This class is deprecated"@en ;
255
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
256
+ rdfs:subClassOf :TelephoneType ;
257
+ owl:deprecated true .
258
+
259
+ :Car a owl:Class ;
260
+ rdfs:label "Car"@en ;
261
+ rdfs:comment "This class is deprecated"@en ;
262
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
263
+ rdfs:subClassOf :TelephoneType ;
264
+ owl:deprecated true .
265
+
266
+ :Cell a owl:Class ;
267
+ rdfs:label "Cell"@en ;
268
+ rdfs:comment "Also called mobile telephone"@en ;
269
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
270
+ rdfs:subClassOf :TelephoneType .
271
+
272
+ :Child a owl:Class ;
273
+ rdfs:label "Child"@en ;
274
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
275
+ rdfs:subClassOf :RelatedType .
276
+
277
+ :Colleague a owl:Class ;
278
+ rdfs:label "Colleague"@en ;
279
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
280
+ rdfs:subClassOf :RelatedType .
281
+
282
+ :Contact a owl:Class ;
283
+ rdfs:label "Contact"@en ;
284
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
285
+ rdfs:subClassOf :RelatedType .
286
+
287
+ :Coresident a owl:Class ;
288
+ rdfs:label "Coresident"@en ;
289
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
290
+ rdfs:subClassOf :RelatedType .
291
+
292
+ :Coworker a owl:Class ;
293
+ rdfs:label "Coworker"@en ;
294
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
295
+ rdfs:subClassOf :RelatedType .
296
+
297
+ :Crush a owl:Class ;
298
+ rdfs:label "Crush"@en ;
299
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
300
+ rdfs:subClassOf :RelatedType .
301
+
302
+ :Date a owl:Class ;
303
+ rdfs:label "Date"@en ;
304
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
305
+ rdfs:subClassOf :RelatedType .
306
+
307
+ :Dom a owl:Class ;
308
+ rdfs:label "Dom"@en ;
309
+ rdfs:comment "This class is deprecated"@en ;
310
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
311
+ rdfs:subClassOf :Type ;
312
+ owl:deprecated true .
313
+
314
+ :Emergency a owl:Class ;
315
+ rdfs:label "Emergency"@en ;
316
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
317
+ rdfs:subClassOf :RelatedType .
318
+
319
+ :Fax a owl:Class ;
320
+ rdfs:label "Fax"@en ;
321
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
322
+ rdfs:subClassOf :TelephoneType .
323
+
324
+ :Female a owl:Class ;
325
+ rdfs:label "Female"@en ;
326
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
327
+ rdfs:subClassOf :Gender .
328
+
329
+ :Friend a owl:Class ;
330
+ rdfs:label "Friend"@en ;
331
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
332
+ rdfs:subClassOf :RelatedType .
333
+
334
+ :Home a owl:Class ;
335
+ rdfs:label "Home"@en ;
336
+ rdfs:comment "This implies that the property is related to an individual's personal life"@en ;
337
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
338
+ rdfs:subClassOf :Type .
339
+
340
+ :ISDN a owl:Class ;
341
+ rdfs:label "ISDN"@en ;
342
+ rdfs:comment "This class is deprecated"@en ;
343
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
344
+ rdfs:subClassOf :Type ;
345
+ owl:deprecated true .
346
+
347
+ :Internet a owl:Class ;
348
+ rdfs:label "Internet"@en ;
349
+ rdfs:comment "This class is deprecated"@en ;
350
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
351
+ rdfs:subClassOf :Type ;
352
+ owl:deprecated true .
353
+
354
+ :Intl a owl:Class ;
355
+ rdfs:label "Intl"@en ;
356
+ rdfs:comment "This class is deprecated"@en ;
357
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
358
+ rdfs:subClassOf :Type ;
359
+ owl:deprecated true .
360
+
361
+ :Kin a owl:Class ;
362
+ rdfs:label "Kin"@en ;
363
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
364
+ rdfs:subClassOf :RelatedType .
365
+
366
+ :Label a owl:Class ;
367
+ rdfs:label "Label"@en ;
368
+ rdfs:comment "This class is deprecated"@en ;
369
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
370
+ rdfs:subClassOf :Type ;
371
+ owl:deprecated true .
372
+
373
+ :Male a owl:Class ;
374
+ rdfs:label "Male"@en ;
375
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
376
+ rdfs:subClassOf :Gender .
377
+
378
+ :Me a owl:Class ;
379
+ rdfs:label "Me"@en ;
380
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
381
+ rdfs:subClassOf :RelatedType .
382
+
383
+ :Met a owl:Class ;
384
+ rdfs:label "Met"@en ;
385
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
386
+ rdfs:subClassOf :RelatedType .
387
+
388
+ :Modem a owl:Class ;
389
+ rdfs:label "Modem"@en ;
390
+ rdfs:comment "This class is deprecated"@en ;
391
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
392
+ rdfs:subClassOf :TelephoneType ;
393
+ owl:deprecated true .
394
+
395
+ :Msg a owl:Class ;
396
+ rdfs:label "Msg"@en ;
397
+ rdfs:comment "This class is deprecated"@en ;
398
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
399
+ rdfs:subClassOf :TelephoneType ;
400
+ owl:deprecated true .
401
+
402
+ :Muse a owl:Class ;
403
+ rdfs:label "Muse"@en ;
404
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
405
+ rdfs:subClassOf :RelatedType .
406
+
407
+ :Neighbor a owl:Class ;
408
+ rdfs:label "Neighbor"@en ;
409
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
410
+ rdfs:subClassOf :RelatedType .
411
+
412
+ :None a owl:Class ;
413
+ rdfs:label "None"@en ;
414
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
415
+ rdfs:subClassOf :Gender .
416
+
417
+ :Other a owl:Class ;
418
+ rdfs:label "Other"@en ;
419
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
420
+ rdfs:subClassOf :Gender .
421
+
422
+ :PCS a owl:Class ;
423
+ rdfs:label "PCS"@en ;
424
+ rdfs:comment "This class is deprecated"@en ;
425
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
426
+ rdfs:subClassOf :TelephoneType ;
427
+ owl:deprecated true .
428
+
429
+ :Pager a owl:Class ;
430
+ rdfs:label "Pager"@en ;
431
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
432
+ rdfs:subClassOf :TelephoneType .
433
+
434
+ :Parcel a owl:Class ;
435
+ rdfs:label "Parcel"@en ;
436
+ rdfs:comment "This class is deprecated"@en ;
437
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
438
+ rdfs:subClassOf :Type ;
439
+ owl:deprecated true .
440
+
441
+ :Parent a owl:Class ;
442
+ rdfs:label "Parent"@en ;
443
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
444
+ rdfs:subClassOf :RelatedType .
445
+
446
+ :Postal a owl:Class ;
447
+ rdfs:label "Postal"@en ;
448
+ rdfs:comment "This class is deprecated"@en ;
449
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
450
+ rdfs:subClassOf :Type ;
451
+ owl:deprecated true .
452
+
453
+ :Pref a owl:Class ;
454
+ rdfs:label "Pref"@en ;
455
+ rdfs:comment "This class is deprecated"@en ;
456
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
457
+ rdfs:subClassOf :Type ;
458
+ owl:deprecated true .
459
+
460
+ :Sibling a owl:Class ;
461
+ rdfs:label "Sibling"@en ;
462
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
463
+ rdfs:subClassOf :RelatedType .
464
+
465
+ :Spouse a owl:Class ;
466
+ rdfs:label "Spouse"@en ;
467
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
468
+ rdfs:subClassOf :RelatedType .
469
+
470
+ :Sweetheart a owl:Class ;
471
+ rdfs:label "Sweetheart"@en ;
472
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
473
+ rdfs:subClassOf :RelatedType .
474
+
475
+ :Tel a owl:Class ;
476
+ rdfs:label "Tel"@en ;
477
+ rdfs:comment "This class is deprecated. Use the hasTelephone object property."@en ;
478
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
479
+ owl:deprecated true .
480
+
481
+ :Text a owl:Class ;
482
+ rdfs:label "Text"@en ;
483
+ rdfs:comment "Also called sms telephone"@en ;
484
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
485
+ rdfs:subClassOf :TelephoneType .
486
+
487
+ :TextPhone a owl:Class ;
488
+ rdfs:label "Text phone"@en ;
489
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
490
+ rdfs:subClassOf :TelephoneType .
491
+
492
+ :Unknown a owl:Class ;
493
+ rdfs:label "Unknown"@en ;
494
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
495
+ rdfs:subClassOf :Gender .
496
+
497
+ :Video a owl:Class ;
498
+ rdfs:label "Video"@en ;
499
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
500
+ rdfs:subClassOf :TelephoneType .
501
+
502
+ :Voice a owl:Class ;
503
+ rdfs:label "Voice"@en ;
504
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
505
+ rdfs:subClassOf :TelephoneType .
506
+
507
+ :Work a owl:Class ;
508
+ rdfs:label "Work"@en ;
509
+ rdfs:comment "This implies that the property is related to an individual's work place"@en ;
510
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
511
+ rdfs:subClassOf :Type .
512
+
513
+ :X400 a owl:Class ;
514
+ rdfs:label "X400"@en ;
515
+ rdfs:comment "This class is deprecated"@en ;
516
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
517
+ rdfs:subClassOf :Type ;
518
+ owl:deprecated true .
519
+
520
+ :adr a owl:ObjectProperty ;
521
+ rdfs:label "address"@en ;
522
+ rdfs:comment "This object property has been mapped"@en ;
523
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
524
+ owl:equivalentProperty :hasAddress .
525
+
526
+ :agent a owl:ObjectProperty ;
527
+ rdfs:label "agent"@en ;
528
+ rdfs:comment "This object property has been deprecated"@en ;
529
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
530
+ owl:deprecated true .
531
+
532
+ :anniversary a owl:DatatypeProperty ;
533
+ rdfs:label "anniversary"@en ;
534
+ rdfs:comment "The date of marriage, or equivalent, of the object"@en ;
535
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
536
+ rdfs:range [ a rdfs:Datatype ;
537
+ owl:unionOf ( xsd:dateTime xsd:gYear ) ] .
538
+
539
+ :bday a owl:DatatypeProperty ;
540
+ rdfs:label "birth date"@en ;
541
+ rdfs:comment "To specify the birth date of the object"@en ;
542
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
543
+ rdfs:range [ a rdfs:Datatype ;
544
+ owl:unionOf ( xsd:dateTime xsd:dateTimeStamp xsd:gYear ) ] .
545
+
546
+ :category a owl:DatatypeProperty ;
547
+ rdfs:label "category"@en ;
548
+ rdfs:comment "The category information about the object, also known as tags"@en ;
549
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
550
+ rdfs:range xsd:string .
551
+
552
+ :class a owl:DatatypeProperty ;
553
+ rdfs:label "class"@en ;
554
+ rdfs:comment "This data property has been deprecated"@en ;
555
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
556
+ owl:deprecated true .
557
+
558
+ :email a owl:ObjectProperty ;
559
+ rdfs:label "email"@en ;
560
+ rdfs:comment "This object property has been mapped"@en ;
561
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
562
+ owl:equivalentProperty :hasEmail .
563
+
564
+ :extended-address a owl:DatatypeProperty ;
565
+ rdfs:label "extended address"@en ;
566
+ rdfs:comment "This data property has been deprecated"@en ;
567
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
568
+ owl:deprecated true .
569
+
570
+ :geo a owl:ObjectProperty ;
571
+ rdfs:label "geo"@en ;
572
+ rdfs:comment "This object property has been mapped"@en ;
573
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
574
+ owl:equivalentProperty :hasGeo .
575
+
576
+ :hasAdditionalName a owl:ObjectProperty ;
577
+ rdfs:label "has additional name"@en ;
578
+ rdfs:comment "Used to support property parameters for the additional name data property"@en ;
579
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
580
+
581
+ :hasCalendarBusy a owl:ObjectProperty ;
582
+ rdfs:label "has calendar busy"@en ;
583
+ rdfs:comment "To specify the busy time associated with the object. (Was called FBURL in RFC6350)"@en ;
584
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
585
+
586
+ :hasCalendarLink a owl:ObjectProperty ;
587
+ rdfs:label "has calendar link"@en ;
588
+ rdfs:comment "To specify the calendar associated with the object. (Was called CALURI in RFC6350)"@en ;
589
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
590
+
591
+ :hasCalendarRequest a owl:ObjectProperty ;
592
+ rdfs:label "has calendar request"@en ;
593
+ rdfs:comment "To specify the calendar user address to which a scheduling request be sent for the object. (Was called CALADRURI in RFC6350)"@en ;
594
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
595
+
596
+ :hasCategory a owl:ObjectProperty ;
597
+ rdfs:label "has category"@en ;
598
+ rdfs:comment "Used to support property parameters for the category data property"@en ;
599
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
600
+
601
+ :hasCountryName a owl:ObjectProperty ;
602
+ rdfs:label "has country name"@en ;
603
+ rdfs:comment "Used to support property parameters for the country name data property"@en ;
604
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
605
+
606
+ :hasFN a owl:ObjectProperty ;
607
+ rdfs:label "has formatted name"@en ;
608
+ rdfs:comment "Used to support property parameters for the formatted name data property"@en ;
609
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
610
+
611
+ :hasFamilyName a owl:ObjectProperty ;
612
+ rdfs:label "has family name"@en ;
613
+ rdfs:comment "Used to support property parameters for the family name data property"@en ;
614
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
615
+
616
+ :hasGender a owl:ObjectProperty ;
617
+ rdfs:label "has gender"@en ;
618
+ rdfs:comment "To specify the sex or gender identity of the object. URIs are recommended to enable interoperable sex and gender codes to be used."@en ;
619
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
620
+
621
+ :hasGivenName a owl:ObjectProperty ;
622
+ rdfs:label "has given name"@en ;
623
+ rdfs:comment "Used to support property parameters for the given name data property"@en ;
624
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
625
+
626
+ :hasHonorificPrefix a owl:ObjectProperty ;
627
+ rdfs:label "has honorific prefix"@en ;
628
+ rdfs:comment "Used to support property parameters for the honorific prefix data property"@en ;
629
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
630
+
631
+ :hasHonorificSuffix a owl:ObjectProperty ;
632
+ rdfs:label "has honorific suffix"@en ;
633
+ rdfs:comment "Used to support property parameters for the honorific suffix data property"@en ;
634
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
635
+
636
+ :hasInstantMessage a owl:ObjectProperty ;
637
+ rdfs:label "has messaging"@en ;
638
+ rdfs:comment "To specify the instant messaging and presence protocol communications with the object. (Was called IMPP in RFC6350)"@en ;
639
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
640
+
641
+ :hasLanguage a owl:ObjectProperty ;
642
+ rdfs:label "has language"@en ;
643
+ rdfs:comment "Used to support property parameters for the language data property"@en ;
644
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
645
+
646
+ :hasLocality a owl:ObjectProperty ;
647
+ rdfs:label "has locality"@en ;
648
+ rdfs:comment "Used to support property parameters for the locality data property"@en ;
649
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
650
+
651
+ :hasNickname a owl:ObjectProperty ;
652
+ rdfs:label "has nickname"@en ;
653
+ rdfs:comment "Used to support property parameters for the nickname data property"@en ;
654
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
655
+ rdfs:seeAlso :nickname .
656
+
657
+ :hasNote a owl:ObjectProperty ;
658
+ rdfs:label "has note"@en ;
659
+ rdfs:comment "Used to support property parameters for the note data property"@en ;
660
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
661
+
662
+ :hasOrganizationName a owl:ObjectProperty ;
663
+ rdfs:label "has organization name"@en ;
664
+ rdfs:comment "Used to support property parameters for the organization name data property"@en ;
665
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
666
+
667
+ :hasOrganizationUnit a owl:ObjectProperty ;
668
+ rdfs:label "has organization unit name"@en ;
669
+ rdfs:comment "Used to support property parameters for the organization unit name data property"@en ;
670
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
671
+
672
+ :hasPostalCode a owl:ObjectProperty ;
673
+ rdfs:label "has postal code"@en ;
674
+ rdfs:comment "Used to support property parameters for the postal code data property"@en ;
675
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
676
+
677
+ :hasRegion a owl:ObjectProperty ;
678
+ rdfs:label "has region"@en ;
679
+ rdfs:comment "Used to support property parameters for the region data property"@en ;
680
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
681
+
682
+ :hasRelated a owl:ObjectProperty ;
683
+ rdfs:label "has related"@en ;
684
+ rdfs:comment "To specify a relationship between another entity and the entity represented by this object"@en ;
685
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
686
+
687
+ :hasRole a owl:ObjectProperty ;
688
+ rdfs:label "has role"@en ;
689
+ rdfs:comment "Used to support property parameters for the role data property"@en ;
690
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
691
+
692
+ :hasSource a owl:ObjectProperty ;
693
+ rdfs:label "has source"@en ;
694
+ rdfs:comment "To identify the source of directory information of the object"@en ;
695
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
696
+
697
+ :hasStreetAddress a owl:ObjectProperty ;
698
+ rdfs:label "has street address"@en ;
699
+ rdfs:comment "Used to support property parameters for the street address data property"@en ;
700
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
701
+
702
+ :hasTitle a owl:ObjectProperty ;
703
+ rdfs:label "has title"@en ;
704
+ rdfs:comment "Used to support property parameters for the title data property"@en ;
705
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
706
+
707
+ :hasUID a owl:ObjectProperty ;
708
+ rdfs:label "has uid"@en ;
709
+ rdfs:comment "To specify a value that represents a globally unique identifier corresponding to the object"@en ;
710
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
711
+
712
+ :hasValue a owl:ObjectProperty ;
713
+ rdfs:label "has value"@en ;
714
+ rdfs:comment "Used to indicate the resource value of an object property that requires property parameters"@en ;
715
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
716
+
717
+ :label a owl:DatatypeProperty ;
718
+ rdfs:label "label"@en ;
719
+ rdfs:comment "This data property has been deprecated"@en ;
720
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
721
+ owl:deprecated true .
722
+
723
+ :language a owl:DatatypeProperty ;
724
+ rdfs:label "language"@en ;
725
+ rdfs:comment "To specify the language that may be used for contacting the object. May also be used as a property parameter."@en ;
726
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
727
+
728
+ :latitude a owl:DatatypeProperty ;
729
+ rdfs:label "latitude"@en ;
730
+ rdfs:comment "This data property has been deprecated. See hasGeo"@en ;
731
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
732
+ owl:deprecated true .
733
+
734
+ :longitude a owl:DatatypeProperty ;
735
+ rdfs:label "longitude"@en ;
736
+ rdfs:comment "This data property has been deprecated. See hasGeo"@en ;
737
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
738
+ owl:deprecated true .
739
+
740
+ :mailer a owl:DatatypeProperty ;
741
+ rdfs:label "mailer"@en ;
742
+ rdfs:comment "This data property has been deprecated"@en ;
743
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
744
+ owl:deprecated true .
745
+
746
+ :note a owl:DatatypeProperty ;
747
+ rdfs:label "note"@en ;
748
+ rdfs:comment "A note associated with the object"@en ;
749
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
750
+ rdfs:range xsd:string .
751
+
752
+ :org a owl:ObjectProperty ;
753
+ rdfs:label "organization"@en ;
754
+ rdfs:comment "This object property has been mapped. Use the organization-name data property."@en ;
755
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
756
+ owl:equivalentProperty :organization-name .
757
+
758
+ :organization-unit a owl:DatatypeProperty ;
759
+ rdfs:label "organizational unit name"@en ;
760
+ rdfs:comment "To specify the organizational unit name associated with the object"@en ;
761
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
762
+ rdfs:range xsd:string ;
763
+ rdfs:subPropertyOf :organization-name .
764
+
765
+ :post-office-box a owl:DatatypeProperty ;
766
+ rdfs:label "post office box"@en ;
767
+ rdfs:comment "This data property has been deprecated"@en ;
768
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
769
+ owl:deprecated true .
770
+
771
+ :prodid a owl:DatatypeProperty ;
772
+ rdfs:label "product id"@en ;
773
+ rdfs:comment "To specify the identifier for the product that created the object"@en ;
774
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
775
+ rdfs:range xsd:string .
776
+
777
+ :rev a owl:DatatypeProperty ;
778
+ rdfs:label "revision"@en ;
779
+ rdfs:comment "To specify revision information about the object"@en ;
780
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
781
+ rdfs:range xsd:dateTime .
782
+
783
+ :role a owl:DatatypeProperty ;
784
+ rdfs:label "role"@en ;
785
+ rdfs:comment "To specify the function or part played in a particular situation by the object"@en ;
786
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
787
+ rdfs:range xsd:string .
788
+
789
+ :sort-string a owl:DatatypeProperty ;
790
+ rdfs:label "sort as"@en ;
791
+ rdfs:comment "To specify the string to be used for national-language-specific sorting. Used as a property parameter only."@en ;
792
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
793
+ rdfs:range xsd:string .
794
+
795
+ :title a owl:DatatypeProperty ;
796
+ rdfs:label "title"@en ;
797
+ rdfs:comment "To specify the position or job of the object"@en ;
798
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
799
+ rdfs:range xsd:string .
800
+
801
+ :tz a owl:DatatypeProperty ;
802
+ rdfs:label "time zone"@en ;
803
+ rdfs:comment "To indicate time zone information that is specific to the object. May also be used as a property parameter."@en ;
804
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
805
+ rdfs:range xsd:string .
806
+
807
+ :value a owl:DatatypeProperty ;
808
+ rdfs:label "value"@en ;
809
+ rdfs:comment "Used to indicate the literal value of a data property that requires property parameters"@en ;
810
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
811
+
812
+ :Address a owl:Class ;
813
+ rdfs:label "Address"@en ;
814
+ rdfs:comment "To specify the components of the delivery address for the object"@en ;
815
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
816
+ owl:equivalentClass [ a owl:Class ;
817
+ owl:unionOf ( [ a owl:Class ;
818
+ owl:intersectionOf ( [ a owl:Restriction ;
819
+ owl:onProperty :country-name ;
820
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
821
+ owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
822
+ owl:onProperty :country-name ] ) ] [ a owl:Class ;
823
+ owl:intersectionOf ( [ a owl:Restriction ;
824
+ owl:onProperty :locality ;
825
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
826
+ owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
827
+ owl:onProperty :locality ] ) ] [ a owl:Class ;
828
+ owl:intersectionOf ( [ a owl:Restriction ;
829
+ owl:onProperty :postal-code ;
830
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
831
+ owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
832
+ owl:onProperty :postal-code ] ) ] [ a owl:Class ;
833
+ owl:intersectionOf ( [ a owl:Restriction ;
834
+ owl:onProperty :region ;
835
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
836
+ owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
837
+ owl:onProperty :region ] ) ] [ a owl:Class ;
838
+ owl:intersectionOf ( [ a owl:Restriction ;
839
+ owl:onProperty :street-address ;
840
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
841
+ owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
842
+ owl:onProperty :street-address ] ) ] ) ] .
843
+
844
+ :Email a owl:Class ;
845
+ rdfs:label "Email"@en ;
846
+ rdfs:comment "To specify the electronic mail address for communication with the object the vCard represents. Use the hasEmail object property."@en ;
847
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
848
+ owl:deprecated true .
849
+
850
+ :Group a owl:Class ;
851
+ rdfs:label "Group"@en ;
852
+ rdfs:comment "Object representing a group of persons or entities. A group object will usually contain hasMember properties to specify the members of the group."@en ;
853
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
854
+ rdfs:subClassOf :Kind ;
855
+ owl:disjointWith :Individual,
856
+ :Location,
857
+ :Organization ;
858
+ owl:equivalentClass [ a owl:Class ;
859
+ owl:intersectionOf ( [ a owl:Restriction ;
860
+ owl:onProperty :hasMember ;
861
+ owl:someValuesFrom :Kind ] [ a owl:Restriction ;
862
+ owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
863
+ owl:onClass :Kind ;
864
+ owl:onProperty :hasMember ] ) ] .
865
+
866
+ :Individual a owl:Class ;
867
+ rdfs:label "Individual"@en ;
868
+ rdfs:comment "An object representing a single person or entity"@en ;
869
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
870
+ rdfs:subClassOf :Kind ;
871
+ owl:disjointWith :Location,
872
+ :Organization .
873
+
874
+ :Name a owl:Class ;
875
+ rdfs:label "Name"@en ;
876
+ rdfs:comment "To specify the components of the name of the object"@en ;
877
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
878
+ owl:equivalentClass [ a owl:Class ;
879
+ owl:unionOf ( [ a owl:Class ;
880
+ owl:intersectionOf ( [ a owl:Restriction ;
881
+ owl:onProperty :additional-name ;
882
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
883
+ owl:minCardinality "0"^^xsd:nonNegativeInteger ;
884
+ owl:onProperty :additional-name ] ) ] [ a owl:Class ;
885
+ owl:intersectionOf ( [ a owl:Restriction ;
886
+ owl:onProperty :family-name ;
887
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
888
+ owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
889
+ owl:onProperty :family-name ] ) ] [ a owl:Class ;
890
+ owl:intersectionOf ( [ a owl:Restriction ;
891
+ owl:onProperty :given-name ;
892
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
893
+ owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
894
+ owl:onProperty :given-name ] ) ] [ a owl:Class ;
895
+ owl:intersectionOf ( [ a owl:Restriction ;
896
+ owl:onProperty :honorific-prefix ;
897
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
898
+ owl:minCardinality "0"^^xsd:nonNegativeInteger ;
899
+ owl:onProperty :honorific-prefix ] ) ] [ a owl:Class ;
900
+ owl:intersectionOf ( [ a owl:Restriction ;
901
+ owl:onProperty :honorific-suffix ;
902
+ owl:someValuesFrom xsd:string ] [ a owl:Restriction ;
903
+ owl:minCardinality "0"^^xsd:nonNegativeInteger ;
904
+ owl:onProperty :honorific-suffix ] ) ] ) ] .
905
+
906
+ :VCard a owl:Class ;
907
+ rdfs:label "VCard"@en ;
908
+ rdfs:comment "The vCard class is equivalent to the new Kind class, which is the parent for the four explicit types of vCards (Individual, Organization, Location, Group)"@en ;
909
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
910
+ owl:equivalentClass :Kind .
911
+
912
+ :fn a owl:DatatypeProperty ;
913
+ rdfs:label "formatted name"@en ;
914
+ rdfs:comment "The formatted text corresponding to the name of the object"@en ;
915
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
916
+ rdfs:range xsd:string .
917
+
918
+ :hasAddress a owl:ObjectProperty ;
919
+ rdfs:label "has address"@en ;
920
+ rdfs:comment "To specify the components of the delivery address for the object"@en ;
921
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
922
+ rdfs:range :Address .
923
+
924
+ :hasEmail a owl:ObjectProperty ;
925
+ rdfs:label "has email"@en ;
926
+ rdfs:comment "To specify the electronic mail address for communication with the object"@en ;
927
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
928
+ rdfs:range :Email .
929
+
930
+ :hasGeo a owl:ObjectProperty ;
931
+ rdfs:label "has geo"@en ;
932
+ rdfs:comment "To specify information related to the global positioning of the object. May also be used as a property parameter."@en ;
933
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
934
+
935
+ :hasKey a owl:ObjectProperty ;
936
+ rdfs:label "has key"@en ;
937
+ rdfs:comment "To specify a public key or authentication certificate associated with the object"@en ;
938
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
939
+ owl:equivalentProperty :key .
940
+
941
+ :hasLogo a owl:ObjectProperty ;
942
+ rdfs:label "has logo"@en ;
943
+ rdfs:comment "To specify a graphic image of a logo associated with the object "@en ;
944
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
945
+ owl:equivalentProperty :logo .
946
+
947
+ :hasName a owl:ObjectProperty ;
948
+ rdfs:label "has name"@en ;
949
+ rdfs:comment "To specify the components of the name of the object"@en ;
950
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
951
+ rdfs:range :Name ;
952
+ owl:equivalentProperty :n .
953
+
954
+ :hasPhoto a owl:ObjectProperty ;
955
+ rdfs:label "has photo"@en ;
956
+ rdfs:comment "To specify an image or photograph information that annotates some aspect of the object"@en ;
957
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
958
+ owl:equivalentProperty :photo .
959
+
960
+ :hasSound a owl:ObjectProperty ;
961
+ rdfs:label "has sound"@en ;
962
+ rdfs:comment "To specify a digital sound content information that annotates some aspect of the object"@en ;
963
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
964
+ owl:equivalentProperty :sound .
965
+
966
+ :hasTelephone a owl:ObjectProperty ;
967
+ rdfs:label "has telephone"@en ;
968
+ rdfs:comment "To specify the telephone number for telephony communication with the object"@en ;
969
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
970
+ owl:equivalentProperty :tel .
971
+
972
+ :hasURL a owl:ObjectProperty ;
973
+ rdfs:label "has url"@en ;
974
+ rdfs:comment "To specify a uniform resource locator associated with the object"@en ;
975
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
976
+ owl:equivalentProperty :url .
977
+
978
+ :key a owl:ObjectProperty ;
979
+ rdfs:label "key"@en ;
980
+ rdfs:comment "This object property has been mapped"@en ;
981
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
982
+ owl:equivalentProperty :hasKey .
983
+
984
+ :logo a owl:ObjectProperty ;
985
+ rdfs:label "logo"@en ;
986
+ rdfs:comment "This object property has been mapped"@en ;
987
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
988
+ owl:equivalentProperty :hasLogo .
989
+
990
+ :n a owl:ObjectProperty ;
991
+ rdfs:label "name"@en ;
992
+ rdfs:comment "This object property has been mapped"@en ;
993
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
994
+ owl:equivalentProperty :hasName .
995
+
996
+ :nickname a owl:DatatypeProperty ;
997
+ rdfs:label "nickname"@en ;
998
+ rdfs:comment "The nick name associated with the object"@en ;
999
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1000
+ rdfs:range xsd:string .
1001
+
1002
+ :photo a owl:ObjectProperty ;
1003
+ rdfs:label "photo"@en ;
1004
+ rdfs:comment "This object property has been mapped"@en ;
1005
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1006
+ owl:equivalentProperty :hasPhoto .
1007
+
1008
+ :sound a owl:ObjectProperty ;
1009
+ rdfs:label "sound"@en ;
1010
+ rdfs:comment "This object property has been mapped"@en ;
1011
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1012
+ owl:equivalentProperty :hasSound .
1013
+
1014
+ :tel a owl:ObjectProperty ;
1015
+ rdfs:label "telephone"@en ;
1016
+ rdfs:comment "This object property has been mapped"@en ;
1017
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1018
+ owl:equivalentProperty :hasTelephone .
1019
+
1020
+ :url a owl:ObjectProperty ;
1021
+ rdfs:label "url"@en ;
1022
+ rdfs:comment "This object property has been mapped"@en ;
1023
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1024
+ owl:equivalentProperty :hasURL .
1025
+
1026
+ :Location a owl:Class ;
1027
+ rdfs:label "Location"@en ;
1028
+ rdfs:comment "An object representing a named geographical place"@en ;
1029
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1030
+ rdfs:subClassOf :Kind ;
1031
+ owl:disjointWith :Organization .
1032
+
1033
+ :additional-name a owl:DatatypeProperty ;
1034
+ rdfs:label "additional name"@en ;
1035
+ rdfs:comment "The additional name associated with the object"@en ;
1036
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1037
+ rdfs:range xsd:string .
1038
+
1039
+ :country-name a owl:DatatypeProperty ;
1040
+ rdfs:label "country name"@en ;
1041
+ rdfs:comment "The country name associated with the address of the object"@en ;
1042
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1043
+ rdfs:range xsd:string .
1044
+
1045
+ :family-name a owl:DatatypeProperty ;
1046
+ rdfs:label "family name"@en ;
1047
+ rdfs:comment "The family name associated with the object"@en ;
1048
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1049
+ rdfs:range xsd:string .
1050
+
1051
+ :given-name a owl:DatatypeProperty ;
1052
+ rdfs:label "given name"@en ;
1053
+ rdfs:comment "The given name associated with the object"@en ;
1054
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1055
+ rdfs:range xsd:string .
1056
+
1057
+ :hasMember a owl:ObjectProperty ;
1058
+ rdfs:label "has member"@en ;
1059
+ rdfs:comment "To include a member in the group this object represents. (This property can only be used by Group individuals)"@en ;
1060
+ rdfs:domain :Group ;
1061
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1062
+ rdfs:range :Kind .
1063
+
1064
+ :honorific-prefix a owl:DatatypeProperty ;
1065
+ rdfs:label "honorific prefix"@en ;
1066
+ rdfs:comment "The honorific prefix of the name associated with the object"@en ;
1067
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1068
+ rdfs:range xsd:string .
1069
+
1070
+ :honorific-suffix a owl:DatatypeProperty ;
1071
+ rdfs:label "honorific suffix"@en ;
1072
+ rdfs:comment "The honorific suffix of the name associated with the object"@en ;
1073
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1074
+ rdfs:range xsd:string .
1075
+
1076
+ :locality a owl:DatatypeProperty ;
1077
+ rdfs:label "locality"@en ;
1078
+ rdfs:comment "The locality (e.g. city or town) associated with the address of the object"@en ;
1079
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1080
+ rdfs:range xsd:string .
1081
+
1082
+ :organization-name a owl:DatatypeProperty ;
1083
+ rdfs:label "organization name"@en ;
1084
+ rdfs:comment "To specify the organizational name associated with the object"@en ;
1085
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1086
+ rdfs:range xsd:string .
1087
+
1088
+ :postal-code a owl:DatatypeProperty ;
1089
+ rdfs:label "postal code"@en ;
1090
+ rdfs:comment "The postal code associated with the address of the object"@en ;
1091
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1092
+ rdfs:range xsd:string .
1093
+
1094
+ :region a owl:DatatypeProperty ;
1095
+ rdfs:label "region"@en ;
1096
+ rdfs:comment "The region (e.g. state or province) associated with the address of the object"@en ;
1097
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1098
+ rdfs:range xsd:string .
1099
+
1100
+ :street-address a owl:DatatypeProperty ;
1101
+ rdfs:label "street address"@en ;
1102
+ rdfs:comment "The street address associated with the address of the object"@en ;
1103
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1104
+ rdfs:range xsd:string .
1105
+
1106
+ :Organization a owl:Class ;
1107
+ rdfs:label "Organization"@en ;
1108
+ rdfs:comment """An object representing an organization. An organization is a single entity, and might represent a business or government, a department or division within a business or government, a club, an association, or the like.
1109
+ """@en ;
1110
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1111
+ rdfs:subClassOf :Kind .
1112
+
1113
+ :Gender a owl:Class ;
1114
+ rdfs:label "Gender"@en ;
1115
+ rdfs:comment "Used for gender codes. The URI of the gender code must be used as the value for Gender."@en ;
1116
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
1117
+
1118
+ :Kind a owl:Class ;
1119
+ rdfs:label "Kind"@en ;
1120
+ rdfs:comment "The parent class for all objects"@en ;
1121
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;
1122
+ owl:equivalentClass [ a owl:Restriction ;
1123
+ owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
1124
+ owl:onDataRange xsd:string ;
1125
+ owl:onProperty :fn ],
1126
+ :VCard .
1127
+
1128
+ :Type a owl:Class ;
1129
+ rdfs:label "Type"@en ;
1130
+ rdfs:comment "Used for type codes. The URI of the type code must be used as the value for Type."@en ;
1131
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
1132
+
1133
+ :TelephoneType a owl:Class ;
1134
+ rdfs:label "Phone"@en ;
1135
+ rdfs:comment "Used for telephone type codes. The URI of the telephone type code must be used as the value for the Telephone Type."@en ;
1136
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
1137
+
1138
+ :RelatedType a owl:Class ;
1139
+ rdfs:label "Relation Type"@en ;
1140
+ rdfs:comment "Used for relation type codes. The URI of the relation type code must be used as the value for the Relation Type."@en ;
1141
+ rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .
1142
+
1143
+ <http://www.w3.org/2006/vcard/ns> a owl:Ontology ;
1144
+ rdfs:label "Ontology for vCard"@en ;
1145
+ rdfs:comment "Ontology for vCard based on RFC6350"@en ;
1146
+ owl:versionInfo "Final"@en .
1147
+
1148
+
1149
+ `,ht=`https://solidos.github.io/contacts-pane/src/ontology/`;function gt(e,t,n,r,i,a,o,s){let c=ht+r,d=s||`this`,f=(0,u.Namespace)(c+`#`)(d);_t(i,n,r,c),l.widgets.appendForm(a,e,{},t,f,o,(e,t)=>{e||l.widgets.errorMessageBlock(a,t)})}function _t(e,t,n,r){let i=r||ht+n,a=(0,u.sym)(i);e.holds(void 0,void 0,void 0,a)||(0,u.parse)(t,e,i,`text/turtle`,()=>null)}var vt=l.ns,q=c.store,yt=`individualAndOrganizationForm.ttl`,bt=`vcard.ttl`;async function xt(e,t,n,r){let i=q.findTypeURIs(n),a=!!(i[vt.vcard(`Organization`).uri]||i[vt.schema(`Organization`).uri]),o=q.updater.editable(n.doc().uri,q);_t(q,pt,yt);let s=l.ns.vcard(`Type`).doc().uri;_t(q,mt,bt,s);try{await q.fetcher.load(n.doc())}catch(e){throw p(`Error loading profile card. Stack: `+e),Error(`Failed to load profile card.`)}t.classList.add(`individualPane`),c.authn.checkUser(),t.appendChild(Be(e,n));let u=a?`organizationForm`:`individualForm`;if(gt(t,n,pt,yt,c.store,e,n.doc(),u),xe(t),Se(n)||t.appendChild(await ft(n,r,r.ulPeople)),c.authn.currentUser()){let r=t.appendChild(e.createElement(`h3`));r.textContent=`Attach a link to any file`,r.classList.add(`contactPanedHeading`),l.widgets.attachmentList(e,n,t,{modify:o})}a?t.appendChild(await ae(n,r)):Se(n)||t.appendChild(await ie(n,r))}var J=c.store,Y=l.ns,St=Y.vcard,X,Ct,Z,wt;function Tt(e,t,n,r,i,a,o){X=r,Ct=t,wt=o;let s=i.dom,f=s.createElement(`div`);f.classList.add(`toolsPane`);let m=s.createElement(`h3`);m.textContent=`Tools`,f.appendChild(m);let h=f.appendChild(s.createElement(`div`));h.classList.add(`statsLog`),Z=h.appendChild(s.createElement(`pre`)),Z.setAttribute(`id`,`logSpace`);let g=f.appendChild(s.createElement(`div`));g.classList.add(`toolsButtonsContainer`);function _(e){let t=e.classList.contains(`btn-primary`);g.querySelectorAll(`button`).forEach(e=>{e.classList.remove(`btn-primary`,`toolsButton--loading`,`toolsButton--error`,`toolsButton--success`),e.classList.add(`btn-secondary`)}),t||(e.classList.remove(`btn-secondary`),e.classList.add(`btn-primary`))}let v=g.appendChild(s.createElement(`button`));v.textContent=`Load main index`,v.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),v.addEventListener(`click`,()=>{_(v),Z.textContent=``,Ot(v,Z)});let y=g.appendChild(s.createElement(`button`));y.textContent=`Statistics`,y.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),y.addEventListener(`click`,()=>{_(y),Z.textContent=``,Dt(Z)});let b=g.appendChild(s.createElement(`button`));b.textContent=`Check individual contact access of selected groups`,b.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),b.addEventListener(`click`,e=>{_(b),Z.textContent=``,Et(e)});let x=g.appendChild(s.createElement(`button`));x.textContent=`Find duplicate contacts`,x.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),x.addEventListener(`click`,function(e){_(x),Z.textContent=``;let t={};t.book=X,t.nameEmailIndex=J.any(X,Y.vcard(`nameEmailIndex`)),Q(Z,`Loading name index...`),c.store.fetcher.nowOrWhenFetched(t.nameEmailIndex,void 0,function(e,n){Q(Z,`Loaded name index.`),t.cards=[],t.duplicates=[],t.definitive=[],t.nameless=[],t.exactDuplicates=[],t.nameOnlyDuplicates=[],t.uniquesSet=[],t.groupProblems=[],t.nameDupLog=J.sym(X.dir().uri+`dedup-nameDupLog.ttl`),t.exactDupLog=J.sym(X.dir().uri+`dedup-exactDupLog.ttl`),t.nameOnlyErrors=[],t.nameLessZeroData=[],t.nameLessIndex=[],t.namelessUniques=[],t.nameOnlyDuplicatesGroupDiff=[];function r(e){return new Promise(function(n){J.fetcher.load(e).then(function(r){Q(Z,` Nameless check `+e);let i={};i[Y.vcard(`hasUID`).uri]=!0,i[Y.dc(`created`).uri]=!0,i[Y.dc(`modified`).uri]=!0;function a(e){return J.statementsMatching(null,null,null,e.doc()).filter(function(e){return!i[e.predicate.uri]})}let o=a(e);if(!o.length)return Q(Z,` Zero length `+e),t.nameLessZeroData.push(e),n(!1);let s=new u.Serializer(J).setBase(e.doc().uri).statementsToN3(o),c=t.nameLessIndex[s];if(c){Q(Z,` Matches with `+c);let r=J.each(null,Y.vcard(`hasMember`),e),i=J.each(null,Y.vcard(`hasMember`),c);for(let a=0;a<r.length;a++){let o=!1;for(let e=0;e<i.length;e++)i[e].sameTerm(r[a])&&(o=!0);if(!o)return Q(Z,`This one groups: `+r),Q(Z,`Other one groups: `+i),Q(Z,`Cant skip this one because it has a group, `+r[a]+`, which the other does not.`),t.nameOnlyDuplicatesGroupDiff.push(e),n(!1)}d(`Group check done -- exact duplicate: `+e)}else Q(Z,`First nameless like: `+e.doc()),Q(Z,`___________________________________________`),Q(Z,s),Q(Z,`___________________________________________`),t.nameLessIndex[s]=e,t.namelessUniques.push(e);n(!0)}).catch(function(r){Q(Z,`Cant load a nameless card!: `+r),t.nameOnlyErrors.push(e),n(!1)})})}function i(){return t.namelessToCheck=t.namelessToCheck||t.nameless.slice(),Q(Z,`Nameless check left: `+t.namelessToCheck.length),new Promise(function(e){let n=t.namelessToCheck.shift();if(!n){if(Q(Z,`namelessUniques: `+t.namelessUniques.length),Q(Z,`namelessUniques: `+t.namelessUniques),t.namelessUniques.length>0){let n=s.createElement(`p`);n.textContent=`Add all `+t.namelessUniques.length+` nameless contacts to the rescued set?`,h.appendChild(n);let r=l.widgets.continueButton(s,function(){t.uniques=t.uniques.concat(t.namelessUniques);for(let e=0;e<t.namelessUniques.length;e++)t.uniqueSet[t.namelessUniques[e].uri]=!0;n.remove(),r.remove(),e(!0)});h.appendChild(r)}else return e(!0);return}r(n).then(function(e){Q(Z,` Nameless check returns `+e),i()})})}function a(){return new Promise(function(e){Q(Z,`Groups loaded`);for(let e=0;e<t.uniques.length;e++)t.uniquesSet[t.uniques[e].uri]=!0;t.groupMembers=[],J.each(null,Y.vcard(`hasMember`)).forEach(e=>{t.groupMembers=t.groupMembers.concat(je(J,e))}),Q(Z,` Naive group members `+t.groupMembers.length),t.groupMemberSet=[];for(let e=0;e<t.groupMembers.length;e++)t.groupMemberSet[t.groupMembers[e].uri]=t.groupMembers[e];t.groupMembers2=[];for(let e in t.groupMemberSet)t.groupMembers2.push(t.groupMemberSet[e]);Q(Z,` Compact group members `+t.groupMembers2.length),e(!0)})}function o(){return new Promise(function(e){t.cards=J.each(void 0,St(`inAddressBook`),t.book),Q(Z,``+t.cards.length+` total contacts`);let n,r,i;for(n=0;n<t.cards.length;n++){if(r=t.cards[n],i=J.anyValue(r,Y.vcard(`fn`)),!i){t.nameless.push(r);continue}if(t.definitive[i]!==r)if(t.definitive[i]){let e=t.duplicates.length;e<100||e<1e3&&e%10==0||e%100,t.duplicates.push(r)}else t.definitive[i]=r}t.duplicateSet=[];for(let e=0;e<t.duplicates.length;e++)t.duplicateSet[t.duplicates[e].uri]=t.duplicates[e];t.namelessSet=[];for(let e=0;e<t.nameless.length;e++)t.namelessSet[t.nameless[e].uri]=t.nameless[e];t.uniques=[],t.uniqueSet=[];for(let e=0;e<t.cards.length;e++){let n=t.cards[e].uri;!t.duplicateSet[n]&&!t.namelessSet[n]&&(t.uniques.push(t.cards[e]),t.uniqueSet[n]=t.cards[e])}Q(Z,`Uniques: `+t.uniques.length),Q(Z,``+t.nameless.length+` nameless contacts.`),Q(Z,``+t.duplicates.length+` name-duplicate contacts, leaving `+(t.cards.length-t.duplicates.length)),e(!0)})}function c(){let e;return Promise.resolve().then(()=>{e=J.sym(t.book.dir().uri+`clean-people.ttl`);let n=[];for(let e=0;e<t.uniques.length;e++)n=n.concat(J.connectedStatements(t.uniques[e],t.nameEmailIndex));let r=new u.Serializer(J).setBase(t.nameEmailIndex.uri);Q(Z,`Serializing index of uniques...`);let i=r.statementsToN3(n);return J.fetcher.webOperation(`PUT`,e,{data:i,contentType:`text/turtle`})}).then(function(){return Q(Z,`Done uniques log `+e),!0}).catch(function(e){Q(Z,`Error saving uniques: `+e)})}function f(e){let n;return Promise.resolve().then(()=>{let r=e.uri.replace(`/Group/`,`/NewGroup/`);n=J.sym(r);let i=[];for(let n=0;n<t.uniques.length;n++)i=i.concat(J.connectedStatements(t.uniques[n],e.doc()));let a=new u.Serializer(J).setBase(e.uri);Q(Z,` Regenerating group of uniques...`+n);let o=a.statementsToN3(i);return J.fetcher.webOperation(`PUT`,n,{data:o,contentType:`text/turtle`})}).then(()=>(Q(Z,` Done uniques group `+n),!0)).catch(e=>{Q(Z,`Error saving : `+e)})}function p(){return Q(Z,`Saving ALL GROUPS`),Promise.all(t.groupObjects.map(f))}t.groupObjects=function(){let e=[];return t.book&&([t.book].forEach(function(t){let n=(t?J.each(t,Y.vcard(`includesGroup`)):[]).map(function(e){return[t,J.any(e,Y.vcard(`fn`)),e]});e=e.concat(n)}),e.sort()),e}().map(e=>e[2]),Q(Z,`Loading `+t.groupObjects.length+` groups... `),J.fetcher.load(t.groupObjects).then(o).then(a).then(i).then(c).then(p).then(function(){Q(Z,`Done!`)})})});let S=g.appendChild(s.createElement(`button`));S.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),S.textContent=`Find contacts with no group`,S.addEventListener(`click`,function(t){_(S),Z.textContent=``,Q(Z,`Loading groups...`),e(Ct,n,async function(e,t){if(!e){Q(Z,`Loading all groups failed. If it persists, contact your admin.`);return}let n=J.any(X,Y.vcard(`nameEmailIndex`));try{await J.fetcher.load(n)}catch(e){p(`Error loading name index (vcard(nameEmailIndex)). Stack: `+e),Q(Z,`Loading name index failed. If it persists, contact your admin.`);return}Q(Z,`Loaded groups and name index.`),At(X),Q(Z,`Groupless list finished.`)})});let C=g.appendChild(s.createElement(`button`));return C.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),C.textContent=`Put all individuals with no group in a new group`,C.addEventListener(`click`,e=>{_(C),Z.textContent=``,kt(X)}),f}async function Et(e){function t(e){l.acl.fixIndividualCardACL(e,e=>Q(Z,e),function(t,n){t?Q(Z,`Success for `+l.utils.label(e)):(p(`Failure for `+e+`: `+n),Q(Z,`Failure for `+e+`: `+n))})}let n=[];for(let e in Ct)n.push(e);for(let e=0;e<n.length;e++){let r=J.sym(n[e]),i=je(J,r);Q(Z,l.utils.label(r)+`: `+i.length+` members`);for(let e=0;e<i.length;e++){let n=i[e];Q(Z,l.utils.label(n)),t(n)}}}function Q(e,t){e.textContent+=t+`
1150
+ `}function Dt(e){let t=J.each(void 0,St(`inAddressBook`),X).length;Q(e,``+t+` contacts loaded. `);let n=J.each(X,St(`includesGroup`));n=[...new Set(n.map(e=>he(e.uri)))].map(e=>J.sym(e)),Q(e,``+n.length+` total groups. `);let r=[];for(let e in Ct)r.push(e);Q(e,``+r.length+` selected groups. `)}async function Ot(e,t){e.classList.add(`toolsButton--loading`),e.classList.remove(`toolsButton--error`,`toolsButton--success`);let n=J.any(X,Y.vcard(`nameEmailIndex`));try{await J.fetcher.load(n)}catch(n){e.classList.remove(`toolsButton--loading`),e.classList.add(`toolsButton--error`),Q(t,`Error: People index has NOT been loaded`+n+`
1151
+ `)}e.classList.remove(`toolsButton--loading`),e.classList.add(`toolsButton--success`),Q(t,` People index has been loaded
1152
+ `)}async function kt(e){let t=await At(e);if(t.length===0){Q(Z,`No groupless contacts found.`);return}let n=null;try{n=await ke(e,`No group`)}catch{}let r=Z.ownerDocument;return new Promise(function(e){let i=r.createElement(`p`);i.textContent=`Add the ${t.length} contacts without groups to a 'No group' group?`,Z.appendChild(i);let a=l.widgets.continueButton(r,async function(){i.remove(),a.remove();for(let e of t)n&&(Q(Z,` adding `+l.utils.label(e)),await Ae(e,n));Q(Z,`People moved to group.`),wt&&wt(),e()});Z.appendChild(a)})}async function At(e){let t=J.any(e,Y.vcard(`groupIndex`)),n=J.any(e,Y.vcard(`nameEmailIndex`));try{await J.fetcher.load([n,t]);let r=J.each(e,Y.vcard(`includesGroup`));await J.fetcher.load(r)}catch(e){p(`Error loading groups. Stack: `+e),Q(Z,`Error loading groups or name index. If it persists, contact your admin.`)}let r={},i=[],a=J.each(e,St(`includesGroup`));a=[...new Set(a.map(e=>he(e.uri)))].map(e=>J.sym(e)),Q(Z,``+a.length+` total groups. `);for(let e=0;e<a.length;e++){let t=a[e],n=je(J,t);Q(Z,l.utils.label(t)+`: `+n.length+` members`);for(let e=0;e<n.length;e++)J.allAliases(n[e]).forEach(function(e){r[e.uri]=t})}let o=J.each(void 0,St(`inAddressBook`),e);Q(Z,``+o.length+` total contatcs`);for(let e=0;e<o.length;e++)r[o[e].uri]||(i.push(o[e]),Q(Z,` groupless `+l.utils.label(o[e])));return Q(Z,``+i.length+` groupless contacts.`),i}var $=l.ns,jt=l.utils,Mt={icon:l.icons.iconBase+`noun_99101.svg`,name:`contact`,global:!1,label:function(e,t){let n=t.session.store.findTypeURIs(e);return n[$.vcard(`Organization`).uri]?`Contact`:n[$.vcard(`AddressBook`).uri]?`Address book`:null},mintClass:l.ns.vcard(`AddressBook`),mintNew:Fe,render:function(e,t,n={}){let r=t.dom,i=t.session.store,a=r.createElement(`div`);return ce(r),l.aclControl.preventBrowserDropEvents(r),a.setAttribute(`class`,`contactPane`),Ce(a,1e3),o().then(()=>d(`Contacts pane rendered for `+e),e=>j(a,r,e.message||``+e)).catch(e=>{j(a,r,e.message||``+e)}),a;async function o(){l.aclControl.preventBrowserDropEvents(r);let o=i.findTypeURIs(e);if(o[$.vcard(`Individual`).uri]||o[$.foaf(`Person`).uri]||o[$.schema(`Person`).uri]||o[$.vcard(`Organization`).uri]||o[$.schema(`Organization`).uri])try{await xt(r,a,e,t)}catch(e){throw p(`Error rendering contact. Stack: `+e),Error(`Failed to render contact: `+(e.message||e))}else if(o[$.vcard(`AddressBook`).uri])u([e],{});else throw p(`No evidence that `+e+` is anything to do with contacts.`),Error(`This does not seem to be a contact or address book.`);let s=c.authn.currentUser();function u(e,t){i.fetcher.load(e).then(function(n){f(e,t)}).catch(function(e){throw p(`Error loading address book. Stack: `+e),Error(`Failed to load address book.`)})}function f(e,o){let c=jt.label($.vcard(`AddressBook`)),l=o.foreignGroup,u=``;e&&e.length>0?(l=e[0],u=jt.label(l.dir())):(i.any(l,$.dc(`title`))||i.any(l,$.vcard(`fn`)),n.solo&&u&&typeof document<`u`&&(document.title=u.value),u=u?u.value:c);let f=i.any(l,$.vcard(`groupIndex`)),p={},m={},h=null,g=null,_=[];function v(e){_.forEach(e=>{e.classList.remove(`btn-primary`),e.classList.add(`btn-secondary`)}),e&&(e.classList.remove(`btn-secondary`),e.classList.add(`btn-primary`))}let y={dom:r,kb:i,ns:$,book:l,options:o,title:u,groupIndex:f,selectedGroups:p,get selectedPeople(){return m},set selectedPeople(e){m=e},get allGroupsLi(){return h},set allGroupsLi(e){h=e},get newGroupLi(){return g},set newGroupLi(e){g=e},actionButtons:_,setActiveActionButton:v,dataBrowserContext:t,div:a,me:s,setMe(e){s=e},paneOptions:n},{main:b,addressBookSection:x,detailsSection:S}=Ft(y);a.appendChild(b);function C(){S.classList.remove(`hidden`)}y.showDetailsSection=C,y.detailsSection=S;let w=r.createElement(`ul`);w.setAttribute(`role`,`list`),w.setAttribute(`aria-label`,`People list`),y.ulPeople=w,y.dataBrowserContext&&(y.dataBrowserContext.ulPeople=w);let T=r.createElement(`div`);T.classList.add(`detailsSectionContent`),T.setAttribute(`role`,`region`),T.setAttribute(`aria-labelledby`,`detailsSectionContent`),T.setAttribute(`aria-live`,`polite`),y.detailsSectionContent=T;let ee=It(y);x.appendChild(ee);let E=r.createElement(`hr`);E.classList.add(`dottedHr`),x.appendChild(E);let{searchSection:te,searchInput:ne}=Lt(y);y.searchInput=ne,x.appendChild(te);let{buttonSection:re,ulGroups:ie}=Rt(y);y.ulGroups=ie,x.appendChild(re);let ae=r.createElement(`section`);ae.classList.add(`peopleSection`),x.appendChild(ae),ae.appendChild(w),S.appendChild(T);let oe=zt(y);x.appendChild(oe),ct(l,T).then(()=>{d(`Async checkDataModel done.`)})}if(typeof document<`u`&&document.location&&(``+document.location).slice(0,16)===`http://localhost`){let t=i.any(e,l.ns.acl(`owner`));t&&(s=t)}return a}}};async function Nt(e){let{dom:t,kb:n,ns:r,book:i,options:a,selectedGroups:o,dataBrowserContext:s}=e;e.showDetailsSection(),e.detailsSectionContent.innerHTML=``;let c=n.any(i,r.vcard(`groupIndex`));try{await n.fetcher.load(c)}catch(e){d(`Error: Group index NOT loaded:`+e+`
1153
+ `)}d(` Group index has been loaded
1154
+ `);let u=await l.widgets.askName(t,n,e.detailsSectionContent,l.ns.foaf(`name`),r.vcard(`Group`),`group`);if(!u)return;let f;try{f=await ke(i,u)}catch(t){d(`Error: can't save new group:`+t),e.detailsSectionContent.innerHTML=`Failed to save group`+t;return}for(let e in o)delete o[e];o[f.uri]=!0;let p=e.allGroupsLi,m=e.newGroupLi;p.parentNode&&p.parentNode.removeChild(p),m.parentNode&&m.parentNode.removeChild(m),Qe(i,a,e.ulGroups,t,o,e.ulPeople,e.searchInput),e.ulGroups.insertBefore(p,e.ulGroups.firstChild),e.ulGroups.appendChild(m),W(e.ulGroups,o);let h=Array.from(e.ulGroups.children).find(e=>e.subject&&e.subject.uri===f.uri);U(e.ulGroups,h?h.querySelector(`button`):null),G(e.ulPeople,null,!1),e.detailsSectionContent.innerHTML=``,e.detailsSectionContent.appendChild(l.aclControl.ACLControlBox5(f.doc(),s,`group`,n,function(t,n){t||(e.detailsSectionContent.innerHTML=`Group sharing setup failed: `+n)}))}function Pt(e,t,n){let{dom:r,kb:i,book:a,selectedGroups:o,dataBrowserContext:s}=e;t.innerHTML=``,l.widgets.askName(r,i,t,l.ns.foaf(`name`),n).then(async t=>{if(!t)return;e.detailsSectionContent.innerHTML=`Indexing...`;let r;try{r=await De(a,t,o,n)}catch{A(`Error saving contact. If it persists, contact your admin.`);return}if(!r){e.detailsSectionContent.innerHTML=``;return}e.selectedPeople={},e.selectedPeople[r.uri]=!0,G(e.ulPeople,null),e.detailsSectionContent.innerHTML=``,e.detailsSectionContent.classList.add(`detailsSectionContent--wide`);let i=s.session.paneRegistry.byName(`contact`).render(r,s);i.classList.add(`renderPane`),e.detailsSectionContent.appendChild(i)})}function Ft(e){let{dom:t}=e,n=t.createElement(`main`);n.id=`main-content`,n.classList.add(`addressBook-grid`),n.setAttribute(`role`,`main`),n.setAttribute(`aria-label`,`Address Book`),n.setAttribute(`tabindex`,`-1`);let r=t.createElement(`section`);r.setAttribute(`aria-labelledby`,`addressBook-section`),r.classList.add(`addressBookSection`,`section-bg`),r.setAttribute(`role`,`region`),r.setAttribute(`tabindex`,`-1`),n.appendChild(r);let i=t.createElement(`section`);return i.classList.add(`detailSection`),i.setAttribute(`role`,`region`),i.setAttribute(`aria-label`,`Details section`),i.classList.add(`hidden`),n.appendChild(i),{main:n,addressBookSection:r,detailsSection:i}}function It(e){let{dom:t,ns:n,title:r,me:i,setMe:a,setActiveActionButton:o}=e,s=t.createElement(`section`);s.classList.add(`headerSection`);let l=t.createElement(`header`);l.classList.add(`mb-md`);let u=t.createElement(`h2`);u.id=`addressBook-heading`,u.setAttribute(`tabindex`,`-1`),u.textContent=r;let d=t.createElement(`button`),f=t.createElement(`div`);d.setAttribute(`type`,`button`),i||d.setAttribute(`disabled`,`true`),c.authn.checkUser().then(e=>{e&&(a(e),d.removeAttribute(`disabled`))}),f.appendChild(d),d.innerHTML=`+ New contact`,d.classList.add(`actionButton`,`btn-primary`,`action-button-focus`);let p=0;return d.addEventListener(`click`,async function(r){o(null),rt(e.ulPeople);let i=++p;if(e.showDetailsSection(),e.detailsSectionContent.innerHTML=``,e.detailsSectionContent.classList.remove(`detailsSectionContent--wide`),await lt(),i!==p)return;e.detailsSectionContent.innerHTML=``;let a=t.createElement(`div`);a.classList.add(`contactTypeChooser`);let s=t.createElement(`label`);s.textContent=`Contact type: `,s.setAttribute(`for`,`contactTypeSelect`),a.appendChild(s);let c=t.createElement(`select`);c.id=`contactTypeSelect`,c.classList.add(`contactTypeSelect`);let l=t.createElement(`option`);l.value=`Individual`,l.textContent=`New person`,c.appendChild(l);let u=t.createElement(`option`);u.value=`Organization`,u.textContent=`New organization`,c.appendChild(u),a.appendChild(c),e.detailsSectionContent.appendChild(a);let d=t.createElement(`p`);d.classList.add(`contactCreationRemark`),d.textContent=`The new contact is added to the already selected group.`,e.detailsSectionContent.appendChild(d);let f=t.createElement(`div`);f.classList.add(`contactFormContainer`),e.detailsSectionContent.appendChild(f);function m(){return c.value===`Organization`?n.vcard(`Organization`):n.vcard(`Individual`)}Pt(e,f,m()),c.addEventListener(`change`,function(){Pt(e,f,m())})},!1),l.appendChild(u),l.appendChild(f),s.appendChild(l),s}function Lt(e){let{dom:t}=e,n=t.createElement(`section`);n.classList.add(`searchSection`);let r=t.createElement(`div`);r.classList.add(`searchDiv`),n.appendChild(r);let i=t.createElement(`input`);i.setAttribute(`type`,`text`),i.setAttribute(`aria-label`,`Search contacts`),i.classList.add(`searchInput`),i.setAttribute(`placeholder`,`Search by name in selected group`),r.appendChild(i);let a=t.createElement(`button`);return a.setAttribute(`type`,`button`),a.setAttribute(`aria-label`,`Clear search`),a.classList.add(`searchClearButton`,`hidden`),a.textContent=`✕`,r.appendChild(a),i.addEventListener(`input`,function(t){let n=i.value.length>0;a.classList.toggle(`hidden`,!n),it(e.ulPeople,!0,e.detailsSectionContent)}),a.addEventListener(`click`,function(){i.value=``,a.classList.add(`hidden`),i.focus(),it(e.ulPeople,!0,e.detailsSectionContent)}),{searchSection:n,searchInput:i}}function Rt(e){let{dom:t,kb:n,book:r,options:i,groupIndex:a,selectedGroups:o,actionButtons:s,setActiveActionButton:c}=e,l=t.createElement(`section`);l.classList.add(`buttonSection`);let u=t.createElement(`ul`);if(u.classList.add(`groupButtonsList`),u.setAttribute(`role`,`list`),u.setAttribute(`aria-label`,`Groups list`),i.foreignGroup&&(o[i.foreignGroup.uri]=!0),r){e.allGroupsLi=t.createElement(`li`);let d=t.createElement(`button`);d.textContent=`All groups`,d.classList.add(`allGroupsButton`,`actionButton`,`btn-primary`,`action-button-focus`,`allGroupsButton--selected`),d.addEventListener(`click`,function(t){if(U(u,d),c(null),!Array.from(u.children).every(function(e){return e.subject?!!o[e.subject.uri]:!0}))d.classList.add(`allGroupsButton--loading`),d.setAttribute(`aria-busy`,`true`),Ze(o,u,function(t,n){if(!t)return A(`Failed to select all groups. If it persists, contact admin.`);d.classList.remove(`allGroupsButton--loading`),d.setAttribute(`aria-busy`,`false`),d.classList.add(`allGroupsButton--active`),W(u,o),G(e.ulPeople,null)});else{d.classList.remove(`allGroupsButton--loading`,`allGroupsButton--active`),d.setAttribute(`aria-busy`,`false`),d.classList.add(`allGroupsButton--loaded`);for(let e in o)delete o[e];W(u,o)}}),e.allGroupsLi.appendChild(d),u.appendChild(e.allGroupsLi),e.newGroupLi=t.createElement(`li`);let f=t.createElement(`button`);f.setAttribute(`type`,`button`),f.innerHTML=`+ New group`,f.classList.add(`allGroupsButton`,`actionButton`,`btn-secondary`,`action-button-focus`),s.push(f),f.addEventListener(`click`,function(t){U(u,f),c(null),rt(e.ulPeople),Nt(e)},!1),e.newGroupLi.appendChild(f),l.appendChild(u),a&&n.fetcher.nowOrWhenFetched(a.uri,r,function(n,a){if(!n){p(`Error loading group index. Stack: `+a),A(`Error loading group index. If it persists, contact admin.`);return}e.allGroupsLi.parentNode&&e.allGroupsLi.parentNode.removeChild(e.allGroupsLi),e.newGroupLi.parentNode&&e.newGroupLi.parentNode.removeChild(e.newGroupLi),Qe(r,i,u,t,o,e.ulPeople,e.searchInput),u.insertBefore(e.allGroupsLi,u.firstChild),u.appendChild(e.newGroupLi),d.classList.add(`allGroupsButton--loading`),d.setAttribute(`aria-busy`,`true`),Ze(o,u,function(t,n){if(!t)return A(`Failed to select all groups. If it persists, contact admin.`);d.classList.remove(`allGroupsButton--loading`),d.setAttribute(`aria-busy`,`false`),d.classList.add(`allGroupsButton--active`),W(u,o),G(e.ulPeople,null)})}),e.allGroupsLi.parentNode&&e.allGroupsLi.parentNode.removeChild(e.allGroupsLi),e.newGroupLi.parentNode&&e.newGroupLi.parentNode.removeChild(e.newGroupLi),qe(r,u,i,t,o,e.ulPeople,e.searchInput,e.detailsSectionContent,e.dataBrowserContext,function(){c(null),e.detailsSectionContent.querySelector(`.contactTypeChooser, .contactFormContainer, .renderPane`)||(e.detailsSectionContent.innerHTML=``,e.detailsSection.classList.add(`hidden`))}),u.insertBefore(e.allGroupsLi,u.firstChild),u.appendChild(e.newGroupLi)}else Qe(r,i,u,t,o,e.ulPeople,e.searchInput),G(e.ulPeople,null),d(`No book, only one group -> hide list of groups`);return{buttonSection:l,ulGroups:u}}function zt(e){let{dom:t,kb:n,ns:r,book:i,options:a,selectedGroups:o,actionButtons:s,setActiveActionButton:c,dataBrowserContext:u,div:f,me:m}=e,h=t.createElement(`div`);if(h.classList.add(`cardFooter`),i){let g=h.appendChild(t.createElement(`button`));g.setAttribute(`type`,`button`),g.innerHTML=`Groups`,g.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),s.push(g),g.addEventListener(`click`,async function(s){c(g),rt(e.ulPeople),e.showDetailsSection(),e.detailsSectionContent.innerHTML=``,e.detailsSectionContent.classList.remove(`detailsSectionContent--wide`);let u=t.createElement(`h3`);u.textContent=`Your groups`,e.detailsSectionContent.appendChild(u);let d=t.createElement(`p`);d.textContent=`When you delete a group it can happen that some contacts end up groupless.`,e.detailsSectionContent.appendChild(d),d=t.createElement(`p`),d.textContent=`To move contacts around, simply drag and drop them onto a group.`,e.detailsSectionContent.appendChild(d);let f;try{f=await et(i)}catch(n){e.detailsSectionContent.appendChild(t.createTextNode(`Failed to load groups: `+n));return}let h=t.createElement(`ul`);h.setAttribute(`role`,`list`),h.setAttribute(`aria-label`,`All groups`),h.classList.add(`groupButtonsList`),f&&(f.sort((e,t)=>{let i=(n.any(e,r.vcard(`fn`))||``).toString().toLowerCase(),a=(n.any(t,r.vcard(`fn`))||``).toString().toLowerCase();return i<a?-1:+(i>a)}),f.forEach(function(r){let{groupLi:s,groupButton:c,name:u}=Je(r);c.addEventListener(`click`,function(t){if(t.preventDefault(),!t.metaKey)for(let e in o)delete o[e];o[r.uri]=!o[r.uri],W(e.ulGroups,o);let i=Array.from(e.ulGroups.children).find(e=>e.subject&&e.subject.uri===r.uri);U(e.ulGroups,i?i.querySelector(`button`):null),n.fetcher.nowOrWhenFetched(r.doc(),void 0,function(t,n){if(!t)return p(`Cannot load group: `+r+`. Stack: `+n),A(`Failed to load group details. If it persists, contact your admin.`);G(e.ulPeople,null,!1)})},!1),l.widgets.makeDropTarget(s,e=>Ye(e,r)),m&&l.widgets.deleteButtonWithCheck(t,s,`group `+u,async function(){await ve(r),delete o[r.uri];let n=e.allGroupsLi,s=e.newGroupLi;n.parentNode&&n.parentNode.removeChild(n),s.parentNode&&s.parentNode.removeChild(s),Qe(i,a,e.ulGroups,t,o,e.ulPeople,e.searchInput),e.ulGroups.insertBefore(n,e.ulGroups.firstChild),e.ulGroups.appendChild(s),W(e.ulGroups,o),G(e.ulPeople,null,!1),g.click()}),h.appendChild(s)})),e.detailsSectionContent.appendChild(h);let _=t.createElement(`button`);_.setAttribute(`type`,`button`),_.innerHTML=`+ New group`,_.classList.add(`actionButton`,`btn-primary`,`action-button-focus`,`newGroupBtn`),_.addEventListener(`click`,function(){Nt(e)},!1),e.detailsSectionContent.appendChild(_)});let _=h.appendChild(t.createElement(`button`));_.setAttribute(`type`,`button`),_.innerHTML=`Sharing`,_.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),s.push(_),_.addEventListener(`click`,function(a){c(_),rt(e.ulPeople),e.showDetailsSection(),e.detailsSectionContent.innerHTML=``,e.detailsSectionContent.classList.remove(`detailsSectionContent--wide`);let o=t.createElement(`h3`);o.textContent=`Sharing`,e.detailsSectionContent.appendChild(o),e.detailsSectionContent.appendChild(l.aclControl.ACLControlBox5(i.dir(),u,`book`,n,function(n,r){n||(p(`ACL control box Failed. Stack: `+r),j(e.detailsSectionContent,t,`Problem displaying sharing controls. If persists, contact admin.`))}));let s={target:i,me:m,noun:`address book`,div:e.detailsSectionContent,dom:t,statusRegion:f};l.login.registrationControl(s,i,r.vcard(`AddressBook`)).then(()=>d(`Registration control finished.`)).catch(n=>{p(`Error in registration control. Stack: `+n),j(e.detailsSectionContent,t,`Problem displaying findable controls. If persists, contact admin.`)})});let v=h.appendChild(t.createElement(`button`));v.setAttribute(`type`,`button`),v.innerHTML=`Tools`,v.classList.add(`actionButton`,`btn-secondary`,`action-button-focus`),s.push(v),v.addEventListener(`click`,function(n){c(v),rt(e.ulPeople),e.showDetailsSection(),e.detailsSectionContent.innerHTML=``,e.detailsSectionContent.classList.add(`detailsSectionContent--wide`),e.detailsSectionContent.appendChild(Tt(Ze,o,e.ulGroups,i,u,m,function(){e.allGroupsLi.parentNode&&e.allGroupsLi.parentNode.removeChild(e.allGroupsLi),e.newGroupLi.parentNode&&e.newGroupLi.parentNode.removeChild(e.newGroupLi),Qe(i,a,e.ulGroups,t,o,e.ulPeople,e.searchInput),e.ulGroups.insertBefore(e.allGroupsLi,e.ulGroups.firstChild),e.ulGroups.appendChild(e.newGroupLi),W(e.ulGroups,o)}))})}return h}module.exports=Mt;
1155
+ //# sourceMappingURL=index.cjs.js.map